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: novice: extract comma delimited data

Re: novice: extract comma delimited data

From: J. G. Dutcher <DutcherJG_at_navair.navy.mil>
Date: Thu, 29 Apr 1999 15:09:04 -0800
Message-ID: <DutcherJG-2904991509040001@judy_dutcher.chinalake.navy.mil>


These are good approaches, but what do you do when the results are wider than sqlplus or sql allows? I need to download a file about 1200 characters per line.
Any help is appreciated.

TIA In article <SO9V2.5499$%L2.240143_at_news6.ispnews.com>, "Chris Nelson" <wrhs71_at_hotmail.com> wrote:

> [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
> WHERE conditions...
> ORDER BY column_1...
> /
>
> 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
> >

TIA Received on Thu Apr 29 1999 - 18:09:04 CDT

Original text of this message

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