Re: How to disable screen display in SQLplus?

From: Bill Robertson <wbrober0_at_wcc.com>
Date: 1998/01/27
Message-ID: <34ce4aa8.22636185_at_news-2.csn.net>#1/1


The following should do it:

set termout off

set heading off	/* May not be needed */
set pause off	/* May not be needed */
set pagesize 0	/* May not be needed */

spool to_your_filename
select * from some_table
spool off

set termout on

set heading on	/* May not be needed */
set pause on	/* May not be needed */
set pagesize 24	/* May not be needed */

The set termout off command turns off the screen display.

The set heading off would only be needed if you had headings set on by default. This would eliminate the column headings (or maybe you want them)

Similarly for the set pause command. The pause command controls the page pausing.

The set pagesize command might be needed if you expected your data set to exceed 24 lines. This eliminates the blank line after every record in the spool file.

My version of Oracle pads each output line out to 80 characters by default or breaks lines at 80 chararcters. If your data will be longer than 80 you can set the linesize up to 255 using set linesize 255 for example.

I use a combination of these techniques to get ASCII CSV files directly (well almost directly) from Oracle.

All the stuff I just talked about can be found in the SQL*Plus manual.

As far as running SQL*Plus from the command line, it kind of depends on the platform you are using. If you're using UNIX you can do anything you want, If you are using NT you are crippled. Hope this helps.

--
Bill Robertson
Woodward-Clyde Group, Inc.
Received on Tue Jan 27 1998 - 00:00:00 CET

Original text of this message