Re: [Q] SQL calls from UNIX scripts?
From: Ian Parkin <twod_at_melbourne.dialix.oz.au>
Date: 9 Jun 1994 20:56:05 +1000
Message-ID: <2t6sg5$ss3$1_at_melbourne.dialix.oz.au>
today_with_oracle_heading=`sqlplus -s <user/pass> << ! SELECT SYSDATE
FROM dual;
exit
!
Date: 9 Jun 1994 20:56:05 +1000
Message-ID: <2t6sg5$ss3$1_at_melbourne.dialix.oz.au>
As an alternative to :
>cat > temp.sql << EOF
<deleted>
there is :-
#!/bin/sh # # Example of sqlplus and << ! # Can also use unix variables in the SQL #
today_with_oracle_heading=`sqlplus -s <user/pass> << ! SELECT SYSDATE
FROM dual;
exit
!
echo ${today_with_oracle_heading}
>Don't forget to put execution privilege on the file that contains these lines.
>Hope this help.
Not needed in above, as is part of the shell script :-)
>I use ORACLE v6.0.36 on DEC RISC ULTRIX v4.3
I use alcohol, pornography, ultra-violence and cadavers, wanna have a party ?
IAP Received on Thu Jun 09 1994 - 12:56:05 CEST