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: Oracle reports question?

Re: Oracle reports question?

From: javier mugueta unzué <jmugueta_at_ocs.es>
Date: Thu, 21 May 1998 13:42:13 +0200
Message-ID: <35641315.BC5FC1BB@ocs.es>


Iancrozier wrote:

> I am trying to output an Oracle report using sqlplus. I want the
> output to look
> like e.g. :
>
> ABCD,123,efg,456
> ABCDE,234,ghij,7893
>
> What I get is:
> ABCD ,123,efg ,456
> ABCDE,234,ghij,7893
>
> Note the extra spaces after ABCD and efg. I've tried rtrim, but that
> doesn't
> work, because there aren't really any spaces in the database.
> Any suggestions?
> TIA
   Convert your char column to varchar2 because char columns are fixed length.

I've tried this and it works.

create table ok (c1 varchar2(10), c2 varchar2(10)); create table notok (c1 char(10), c2 varchar2(10));

insert into ok values ('a', 'a');

insert into notok values ('b', 'b');

select 'good way: ' || c1 || ',' || c2 from ok;

select '!!!!' || c1 || ',' || c2 from notok;

drop table ok;
drop table notok;

god bye!!! Received on Thu May 21 1998 - 06:42:13 CDT

Original text of this message

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