Admins,
Is there a way to set a unix shell variables to oracle sqlplus variables.
The following sql called in a shell sript
and I want to capture the output variables err_num and err_mesg into shell script variables:
#!/bin/ksh
filename='test.txt'
err_num=''
err_mesg=''
sqlplus -s scott/tiger@orcl <<EOF
var serr_num varchar2(10);
var serr_mesg varchar2(20);
set serveroutput on;
exec extr_dps_orders('$filename',:serr_num,:serr_mesg);
exit;
EOF
exit
EOF
?? how do I set err_num and err_meg
Thanks
Umesh
Is there a way to set a unix shell variables to oracle sqlplus variables.
The following sql called in a shell sript
and I want to capture the output variables err_num and err_mesg into shell script variables:
#!/bin/ksh
filename='test.txt'
err_num=''
err_mesg=''
sqlplus -s scott/tiger@orcl <<EOF
var serr_num varchar2(10);
var serr_mesg varchar2(20);
set serveroutput on;
exec extr_dps_orders('$filename',:serr_num,:serr_mesg);
exit;
EOF
exit
EOF
?? how do I set err_num and err_meg
Thanks
Umesh