I am spooling a large result to disk and want to include the headers only once. I want headings but only once, not every 50,000 records. Based on the documentation I seem to be limited to 50,000 records before the header is printed a second time. According to the documentation 50,000 is the highest value.
I've tried setting the pagesize to zero and headings on - but that still produces a file with no header:
set pagesize 0
set heading on
Ideally I want to be able to perform a line count on the output file in unix:
wc -l result-file.txt
and it equals the Number of records in the query + 1.