Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

sql script "set heading ON" doesn't work

287254Sep 9 2002
This question might be silly, but it would be great if someone can help me out.
I want to spool a table to a file with the column heading on, so I wrote a sql script like

set heading ON
set pagesize 0
set termout off

spool XXXX

select column1 || ','|| column2 ||','|| ... from table
/
spool off

However, when I run this script, the spooled file is always with no column headings. The sql plus session's environment has the default heading on. I have no idea what might go wrong? Could this be solved if I restat the database server? Because I run this on both the db server and workstations, I got the same result.

Thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2002
Added on Sep 9 2002
7 comments
1,255 views