There was just the ticket in an Oracle mag online piece by Ian Craig a
while back.

http://www.oracle.com/oramag/webcolumns/2001/index.html?op_unixway.html

A trivial example from the article:

********************************************************
print "select * from dual;" | sqlplus -s scott/tiger

produces the following output: 

D
-
X
********************************************************

Jim

-----Original Message-----
Sent: Thursday, March 14, 2002 8:33 AM
To: Multiple recipients of list ORACLE-L


!/bin/ksh
sqlplus / <<EOF
select sysdate from dual;
EOF
exit

>>> [EMAIL PROTECTED] 03/14/02 06:26AM >>>

Hi all,
How do I issue SQL staments to the Oracle server from shell scripts
-preferably korn shell. Example scripts highly welcome.

Thanx 'n Ciao
+---------------------------------------------------+
CSW,
MTN-Uganda, 8th Floor UDB Building
Cell: 077-212655,http://mtn.co.ug 
+---------------------------------------------------+ 

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com 
--
Author: Simon Waibale
  INET: [EMAIL PROTECTED] 

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: [EMAIL PROTECTED] (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).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Gene Sais
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Conboy, Jim
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to