Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Rtrim seems not to work as expected

Re: Rtrim seems not to work as expected

From: Richard Kuhler <noone_at_nowhere.com>
Date: Fri, 15 Aug 2003 18:18:20 GMT
Message-ID: <Mt9%a.49$Wo1.29688@twister.socal.rr.com>


TurkBear wrote:

<snip>

> Set colsep to ','
> set heading, feedback, etc off
> got the following:( employee numbers deleted for security - names are public data.
> -------------------------------------------------------------------------------------------------------------------------------------
> select rtrim(empl_nm),empl_nbr from hr_public where rownum < 9;

<snip>

> Why is it still allocating 50 spaces ( the field is a varchar2(50) ) even though I specified RTRIM?

I don't know how you would have ever had that working. SQL*Plus allocates the column widths based on your COLUMNS settings or the data dictionary. To get adjacent results, you'd have to make this all one column as far as I know.

select rtrim(empl_nm) || ',' || empl_nbr from hr_public
where rownum < 9;

Richard Kuhler Received on Fri Aug 15 2003 - 13:18:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US