Hi Friends,
I am trying to run a sql query from shell script as below but I get "Bind variable "1" not declared" error.
1.sh shell script has following:
sDb="abc/xyz@aaa"
a="1.sql"
sqlplus -s $sDb @$a $1
1.sql file has following:
spool Result.tmp append
select cust_name from orders where order_id=&1;
spool off;
exit;
I execute shell script as below:
1.sh 1234
It creates the Result.tmp but has following error:
Bind variable "1" not declared
Thank you so much,
Prashant