|
-
Hi,
You can't give $ inside the sql statement. You have to have a shell script which has the $ arguments and the sql should have '&' inside. Here is an example :
Sql Script: a.sql
select to_date('&dt1') + 1,to_date('&dt2') + 1
from dual;
Shell script: a.sh
date1=$1
date2=$2
cr="\n"
echo $date1 $cr $date2 | sqlplus user/pwd @a.sql
##End SH script.
At the unix prompt:
$ a.sh 01-nov-2000 02-nov-2000
Hope this helps.
Thanks
Padma
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|