Re: Column Headings using sqlplus script not working

From: Charles Hooper <hooperc2001_at_gmail.com>
Date: Wed, 11 Jan 2012 12:18:28 -0800 (PST)
Message-ID: <10dd551e-f114-45fc-8b40-6f05c2fdc2a5_at_v13g2000yqc.googlegroups.com>



On Jan 11, 3:06 pm, "Gerard H. Pille" <g..._at_skynet.be> wrote:
> Roger wrote:
> > Hello,
> > Stupid question here. I'm having brain freeze.
> > I have a real simple script that I run in sqlplus
>
> > set colsep ','
> > set HEAD ON
> > set pagesize 0
> > set trimspool on
> > set linesize 1000
> > set feedback off
> > spool paymastr3.csv
> > select * from paymastr
> >    where check_date='30-Dec-11';
> > spool off
>
> > I can execute the sql script and the csv file is created, but NO
> > column headings are appearing. I have tried everything, but still no
> > headings. I've tried set HEADINGS ON but that doesn't work
>
> > This is Oracle 9i
>
> > Any ideas?
>
> > Thanks,
> > -R
>
> because of the "set pagesize 0"
>
> that is why

Gerard is correct.

See this page for more:
http://gennick.com/html.html
"50,000 lines is the largest PAGESIZE value that SQL*Plus supports. You can use SET PAGESIZE 0 to disable pagination completely, but then you don't get any column headings."

Charles Hooper
http://hoopercharles.wordpress.com/
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc. Received on Wed Jan 11 2012 - 14:18:28 CST

Original text of this message