Passing O/S variables to SQLPLUS
From: Chuck Hamilton <chuckh_at_ix.netcom.com>
Date: 1996/01/25
Message-ID: <4e93aa$e8u_at_ixnews4.ix.netcom.com>#1/1
Date: 1996/01/25
Message-ID: <4e93aa$e8u_at_ixnews4.ix.netcom.com>#1/1
export $USRNAM=xyz
In the sqlplus script I want to use that variable in a select like this:
define tbl_owner = $USRNAM
SELECT 'drop table '||owner||'.'||table_name||';'
FROM sys.dba_tables
WHERE owner = '&&tbl_owner';
But *after* substitution, the WHERE clause contains the variable name, not it's value.
-- Chuck Hamilton chuckh_at_ix.netcom.com If at first you don't succeed, sky-diving isn't for you.Received on Thu Jan 25 1996 - 00:00:00 CET