Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Heading display in SQL
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