-
spool file test.txt
I have to extract the data and create a spool file, the data length is not fixed. What is the best approach of using SET commands if the record length is not fixed. Please help.
Set newpage 0
Set pagesize 0
Set feedback off
Set verify off
Set echo off
Set tab off
Set heading off
Set recsep off
set termout on
Thanks
-
If you are not able to speficy format by set commands for whatever reason, I would use builtin functions and concatenate operator to produce a comma delimited file usable in windows xcel and for sqlldr like this:
spool file.txt
select substr(col1,1,100)||','||rpad(col2,20,' ')||','||ltrim(col3)||','||col4 from table where ...
spool off