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

Home -> Community -> Usenet -> c.d.o.server -> Re: Heading display in SQL

Re: Heading display in SQL

From: Peter van Rijn <p.vanrijn_at_rm-this.zhew.nl>
Date: Tue, 23 Jul 2002 13:09:56 +0200
Message-ID: <ujqe7koelh0095@corp.supernews.com>


By concatenating the columns SQL*Plus considers them to be one single column. You can use two methods:

one-

select price1 || '|' || price2 || '|' || price3 "Comm.|Paid|Profit" from pricelist;

two-

column concatcol heading "Comm.|Paid|Profit"

select price1 || '|' || price2 || '|' || price3 concatcol from pricelist;

The latter method provides more flexibility.

regards,
Peter

"Md Irfan" <irfan_pk_at_hotmail.com> schreef in bericht news:c42168e7.0207230239.6428bed8_at_posting.google.com...
> Hi,
>
> SQL> column price1 heading "Commission"
> SQL> column price2 heading "Paid"
> SQL> column price3 heading "Profit"
>
> SQL> select price1 || '|' || price2 || '|' || price3 from pricelist
>
> PRICE1||'|'||PRICE2||'|'||PRICE3
> -----------------------------------
> 100|50000|500
> 100|25000|400
> 50|25000|100
>
> Hence after setting the heading values, I would like to get Price1 as
> Commission, Price2 as Paid, Price3 as Profit, but I get the display
> only as Price1,Price2,Price3.
> Any suggestions and Idea Please.
>
> Thanks.
Received on Tue Jul 23 2002 - 06:09:56 CDT

Original text of this message

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