Re: Export to Fixed width/Delimited File
Date: 1995/09/10
Message-ID: <42tsvt$dkh_at_nntp.crl.com>#1/1
noodles_at_aol.com (Noodles) wrote:
>Continuing the thread...
>
>Mike, What about "long" data that extends over multiple lines ? I've
>been trying for days to script out an ASCII file for SQLLOAD to load into
>a remote database but it always loads null for the long data. Should I
>get rid of SQLPlus and use a different output tool that SQLLoad can more
>easily read ?
I wrote a perl wrapper for SQL/PLUS. Parsing the results of a query are handled by modifying the query to return a delimiter between each column. Keeping the result on a single line is handled with: set linesize 1000 (I use 1000 as a default buffer size, adjust as necessary).
The can result in a large output file. Piping it through something to trim the trailing spaces off of shorter lines is a good idea (ex: sqlquery | perl -pe 's/ *$//;' > output).
Hope this helps.
Jim F
CARTOTECH
Received on Sun Sep 10 1995 - 00:00:00 CEST