--
Peace,
Michelle
I am too blessed to be stressed.
http://home.sprynet.com/sprynet/hrdbdy
http://www.ebonyelegance.com
A Premiere Web Site About African-Americans
Establishing Our Presence On The Web
ICQ# 17965901 - http://www.icq.com
AOL Screen Name - mdwarne
You can use the following way to pass shell variables to isql scripts:
#!/bin/sh
param1=VALUE1
param2=VALUE2
isql -Uusername -Ppassword -Sservername<<EOF
# Any SQL statements
exec proc_name $param1,$param2
go
EOF
Hope this helps!
Fred.
In article <384DA6C5...@sprynet.com>,
Sent via Deja.com http://www.deja.com/
Before you buy.
>I have a shell script which is being called from another application
>with parameters. The shell script issues the isql command which
>includes and input file. The input file executes a stored procedure
>which requires arguments. Is there anyway for me to pass the parameters
>passed to the shell script to the stored procedure? Thanks in advance.
Yes, in Korn shell it works likes this
isql -U$USER -P$PASS -S$SERVER -o logfile <<-EOI
/* SQL code until EOI */
use mydb
go
sp_mystoredproc @param1 = "$UNIX_ENVIRONMENT_VAR"
go
EOI
# rest of Unix script
# (parse output in logfile)
__________________________________________________
"Nothing is as subjective as reality"
Reinoud van Leeuwen rei...@xs4all.nl
http://www.xs4all.nl/~reinoud
__________________________________________________
If you use the unix parameter as an input parameter for the sp, it will
work.
Ronald
Michelle Warner wrote:
> I have a shell script which is being called from another application
> with parameters. The shell script issues the isql command which
> includes and input file. The input file executes a stored procedure
> which requires arguments. Is there anyway for me to pass the parameters
> passed to the shell script to the stored procedure? Thanks in advance.
>