![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
On Jan 11, 3:06*pm, "Gerard H. Pille" <g... (AT) skynet (DOT) 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 Hooperhttp://hoopercharles.wordpress.com/ IT Manager/Oracle DBA K&M Machine-Fabricating, Inc. |
#6
| |||
| |||
|
|
If you are expecting more than 50K records you can modify your script to: |
#7
| |||
| |||
|
|
On Sun, 15 Jan 2012 19:39:58 -0800, onedbguru wrote: If you are expecting more than 50K records you can modify your script to: Maybe in that case the script should start with "#!/usr/bin/perl -w"? --http://mgogala.byethost5.com |
???
#8
| |||
| |||
|
|
except that this is a sql script and not a perl script... ??? |
#9
| |||
| |||
|
|
On Mon, 16 Jan 2012 05:44:57 -0800, onedbguru wrote: except that this is a sql script and not a perl script... *??? My personal preference for retrieving 50,000 rows would be a Perl script. I am not sure what would "sql script" do with the output? --http://mgogala.byethost5.com |
#10
| |||
| |||
|
|
If Excel is going to be involved, I suspect about 15535 more rows might start having issues. |
![]() |
| Thread Tools | |
| Display Modes | |
| |