Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: sql script

RE: sql script

From: Jagels, Simon <SJagels_at_primeresponse.com>
Date: Tue, 23 Jan 2001 05:28:51 -0500
Message-Id: <10750.127250@fatcity.com>


Suhen,

Have you tried running SQL*Plus in silent mode:

sqlplus -s username/password << EOF
set echo off
set feedback off
set heading off
spool file
select ....
/

spool off
EOF Then run the script from the command line.

Regards,

Simon.

-----Original Message-----
From: Suhen Pather [mailto:Suhen.Pather_at_strandbags.com.au] Sent: 23 January 2001 04:55
To: Multiple recipients of list ORACLE-L Subject: sql script

List,

I am having a problem with a sql script than I am running. What I am trying to achieve is to get the result from this script which would be either T or F without the select statement. I get the result including the select that is being executed. eg

select D2 from job
where Name=upper('dailyman_flag')
/

T

Here is script that I execute

spool flag.sql
set verify off
set echo off
set heading off
set serveroutput off
set feedback off
select 'select D'||cal_day_of_wk|| ' from job_temp where Name=upper(''&1'');' from caldayee
/

spool off
@flag.sql

Is there a way to get just the result of T or F without showing the select statement?
If I execute flag.sql alone it seems to give the answer. but I need to run it in a script
as above

TIA
Suhen

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Suhen Pather
  INET: Suhen.Pather_at_strandbags.com.au

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
Received on Tue Jan 23 2001 - 04:28:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US