Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: [SQL*Plus] Delimitting with pipe characters is possible?
aleatory wrote:
> Hi SQL*Plus gurus,
>
> It would help my life tremendously if there is
> a way to set delimiters in SQL*Plus.
>
> The following is what I'd like to hopefully get
> after executing my SQL*Plus programs.(Please note
> that I need no column headers but just plain pipe-
> delimited data):
>
> |1|0|
> |2|0|
> |3|0|
> |4|0|
> |5|0|
> |6|0|
> |7|SYSTEM|5|
> |8|USERA|21|
>
> However, the following is the output after executing
> the SQL code below:
>
> | SQL> SELECT sid,
> | 2 username,
> | 3 user#
> | 4 FROM v$session;
> |
> | SID USERNAME USER#
> | --- -------- -----
> | 1 0
> | 2 0
> | 3 0
> | 4 0
> | 5 0
> | 6 0
> | 7 SYSTEM 5
> | 8 USERA 21
>
> Thanks in advance,
>
> alea
SELECT TO_CHAR(sid) || '|' ||
USERNAME || '|' || TO_CHAR(USER#)
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Sun Nov 23 2003 - 21:32:01 CST