Hi,
I am trying to spool a table containing at least one CLOB column to a file. My ultimate goal is to use a single script to spool any table, regardless of the number of columns. I was very close using 'set wrap off' in my script, until I noticed CLOB columns are limited to 80 characters. I thought by adding 'set long 32767', 'set longchunksize 32767' and 'set linesize 32767', it would work, but it is not. My script:
set long 32767
set longchunksize 32767
set pagesize 0
set linesize 32767
set trimspool on
set wrap off
set colsep "|"
set head off
set verify off
set feedback off
set termout off
alter session set nls_date_format = 'MM/DD/YYYY HH24:MI:SS';
spool <spool_file.txt>
select * from <tablename>;
spool off