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

Home -> Community -> Usenet -> c.d.o.misc -> sqlplus / passing variable to all instances

sqlplus / passing variable to all instances

From: Joe <jchristl_at_zdnetmail.com>
Date: 12 Feb 2006 12:52:00 -0800
Message-ID: <1139777520.655271.101450@o13g2000cwo.googlegroups.com>


Hey all,

I'm an admitted newbie when it comes to the meat 'n' potatoes of SQL. I can do simple one line selects or updates. but anything bigger than that give me the willies.

We have this .sql script that users call to update two different tables when the need arises. The problem is the variables entered. For some reason, the variable entered won't populate the second calling of it. Ex.

UPDATE BOX_VARIATION
SET LAST_PASS=3
WHERE BOX_ID=&BOX
AND VARIATION_NUMBER=&VAR
/

UPDATE KEYTOTALS
SET LAST_PASS='PASS3'
WHERE BOX_ID=&BOX
AND VARIATION_NUM=&VAR
AND RPT_NAME != 'INFX000'
/

When this is called from the sql> I'd like for the 'box' and 'var' variables to pass to both update lines. Is there anyway I can accomplish this?

As an added bonus, I would like for a one or two line message to be displayed before they enter anything. More of a warning of what to do and what not to do. This also has eluded me.

Thank you for any help you are able to provide Received on Sun Feb 12 2006 - 14:52:00 CST

Original text of this message

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