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: [SQL*Plus] Delimitting with pipe characters is possible?

Re: [SQL*Plus] Delimitting with pipe characters is possible?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 23 Nov 2003 19:32:01 -0800
Message-ID: <1069644747.793273@yasure>


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#)

FROM v_$session;
-- 
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

Original text of this message

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