I have a lot of data that I want to spool to a csv file. I need to set heading off so the heading will not repeat every page. However, I still need my produced file to contain headers. Is there a way to add a row of headers (not to the table itself) into the query that won't actually be considered a header when spooling? This is my code which works, it just doesn't contain headers when I set heading off.
select a.col1 as name1,
a.col2 as name2,
b.col3 as name3
from tab1 a,
tab2 b
Thanks in advance
set pagesize 0will get you one heading per query. docs.oracle.com/cd/E11882_01/server.112/e16604/…. However not perfect for CSV, since it includes the column names and line with------------s.