Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> OT!! Sybase supply value on-the-fly from input script
Solaris 9 ASE server 12.5.0.3 :-)
Using sqlplus with Oracle, I can write a script like this
select os_username, username, userhost, terminal,
to_char(timestamp,'DD-Mon hh24:mi') timest , returncode
and either supply the value for &&1 on the command line
$ sqlplus barb/sspwd @audits 5
or run the script and supply the value when the script runs
$ sqlplus barb/sspwd @audits
Connected to: Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production Enter value for 1: 5
Does anyone know how to do the same thing in sybase?
I can supply the value from within a script:
DA=$1
$SYBASE/bin/isql -U${PPIUSER} -P${SYBPASSWD} -w244 << EOF1 select DA.Id, "DA.AdSysAdNo" = convert(char(10),DA.AdSystemAdNo), from DisplayAd DA where DA.AdSystemAdNo='$DA' go
EOF1 But I cannot figure out a way to prompt interactively for the value "on-the-fly".
If anyone knows how to do this, I would love to know.
Thanks!
Barb
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Oct 04 2007 - 10:40:25 CDT