Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: novice: extract comma delimited data
[posted and emailed]
Hi, Furkan.
I do this all the time, and I like SQL much better than the gui. That export utility is not all that trustworthy sometimes.
Write this up as a file, like EXPORT.SQL, for instance:
SPOOL Drive:\Path\Filename.TXT
SELECT a.column_1 || ', ' || a.column_2 || ', ' || b.column_3 || ', '
FROM table_1 a , table_2 b
SPOOL OFF I use the final (extra) comma to delimit the last column, because I find that Excel or Oracle adds extra spaces to the last value if I don't add it. There might be a neater way, like RTRIM( column_3) or something, but this works fine for me.
Chris
Furkan Khan wrote in message <3724F703.B40C1E9B_at_home.com>...
>Folks, I am a novice at SQL, its been quite some time since I used
>it. Can someone recommend me the best way to dump out data
>from an oracle table into comma delimited form.
>
>I know the the Oracle Navigator allows it via the gui, but I want
>a sql script or some other scripting utility.
>
>Thanks in advance. You can mail me directly also.
>
>Regards.
>Furkan Khan
>
Received on Mon Apr 26 1999 - 22:07:10 CDT
![]() |
![]() |