Re: Spooling variable length output
From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1995/11/13
Message-ID: <487pjm$n4m_at_ixnews3.ix.netcom.com>#1/1
Date: 1995/11/13
Message-ID: <487pjm$n4m_at_ixnews3.ix.netcom.com>#1/1
What I've done in the past is to append a TAB character (chr(9)) to the end of the line and use the the UNIX 'cut' utility to lop off everything from the TAB on.
In sqlplus...
SET PAGESIZE 0
cut -f1 myfile.lst > temp
SET LINESIZE 338
SPOOL myfile
SELECT '"'||col1||'","'||col2||'","'||col3||'"'||chr(9)
FROM mytable;
SPOOL OFF
In UNIX...
mv temp myfile.lst
-- Chuck Hamilton chuckh_at_ix.netcom.com Incoming fire has the right of way!Received on Mon Nov 13 1995 - 00:00:00 CET