Re: SQLPlus <-Passing Variables into a script
From: Nicholas Kitchener <nkitchen_at_axion.bt.co.uk>
Date: 8 Nov 1994 15:31:35 GMT
Message-ID: <39o5kn$73j_at_pheidippides.axion.bt.co.uk>
Date: 8 Nov 1994 15:31:35 GMT
Message-ID: <39o5kn$73j_at_pheidippides.axion.bt.co.uk>
Try:
sqlplus -s user/passwd <<END _at_SQLQuery.sql quit END then in the file 'SQLQuery': .... ... SQL instuction .. &1 ... &2 ;
For instance:
SELECT System.SystemName, to_char(System.BootDate, '&1') FROM System WHERE System.BootDate >= to_date('&2','&1') AND System.Failure > 0;
The &<number> is like shells $<number>
I hope this helps, although you may have had a few mails by now.
Nick. Received on Tue Nov 08 1994 - 16:31:35 CET