Skip to Main Content

Oracle Database Discussions

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!

Spooling column headers correctly

user11438442Sep 13 2012 — edited Sep 13 2012
Hi,
Im trying spooling a file in DB with below mentioned details.

SET SERVEROUTPUT OFF
set heading on
SET PAUSE OFF
SET FEED OFF
SET PAGES 0
SET LINE 5000
SET VERI OFF
SET TERM OFF
SET TERMOUT OFF
SET TIME OFF
SET UNDERLINE OFF
SET COLSEP ','
SET ECHO OFF
SET TRIM ON
SET TRIMOUT ON
SET TRIMSPOOL ON
set newpage none

spool ${OUTPUT_PATH}/${REPORT_NAME}/${REPORT}_${START_DATE}.csv
@${SCRIPT_PATH}/${REPORT_NAME}/my_query.sql
spool off
exit;
EOF


file .sql has 20 odd columns.

When file is spooled, it shows no columns headers at the top, why is it happening, I dont want to spool column headers separately.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2012
Added on Sep 13 2012
12 comments
11,127 views