RE: sqlplus

From: Bellows, Bambi (Comsys) <"Bellows,>
Date: Tue, 6 Oct 2009 12:49:55 -0500
Message-ID: <>

Wait, wait, wait. Careful there with colsep. Setting that to "" will remove the space between columns in a report. So,

Set colsep ""

Select city,state from tab;

SAN FRANCISCOCA There are an awful lot of set commands. The two you want are SQLPROMPT which will get rid of the SQL> SQL> SQL> and SQLNUMBER which will get rid of the 2 3 4...13.

I happen to be fond of others. I like set pages 0. I like set ver off. I like managing my feedback. But what you are asking for are SQLPROMPT and SQLNUMBER.

If you are interested in learning more, check out any of the myriad of sites which discuss the SET command.

-----Original Message-----
[] On Behalf Of Rich Jesse Sent: Tuesday, October 06, 2009 11:37 AM To: oracle_l
Subject: Re: sqlplus

Hi Joan,

> I have a shell script report the following output for my daily check
> routine. I found the SQL> SQL> SQL> is very annoying, is it possible
> get rid off the "lines from coonected to:" to 2 3 4...13" ?

I've needed to include these settings in the shell I'm working on in order
to make sure that the login.sql/glogin.sql settings do not interfere with
the output format (10.1 on AIX):

set heading off trimout on tab off echo off termout on colsep "" verify off
feedback off newpage 0 linesize 80 pagesize 100 showmode off

There may be more! These are only the ones that affected my output. I also
needed to use "cut" to trim the output, like this:

my_status=`sqlplus -s / _at_$ADMIN/my.sql|cut -f 10 -d " "`

And, as others have mentioned, use "-s" with "sqlplus" to silence the extra
verbage, too.

It seems like all of this is more excessive than I've used in the past, but
it works consistently for me.



Received on Tue Oct 06 2009 - 12:49:55 CDT

Original text of this message