Calling PLSQL function in a shell script
From: <radhika.penagonda_at_gmail.com>
Date: 9 Nov 2006 08:47:28 -0800
Message-ID: <1163090848.201913.252660_at_h54g2000cwb.googlegroups.com>
[Quoted] Have been trying this for an entire day now with no luck:
Date: 9 Nov 2006 08:47:28 -0800
Message-ID: <1163090848.201913.252660_at_h54g2000cwb.googlegroups.com>
[Quoted] Have been trying this for an entire day now with no luck:
Have a PLSQL function func(var1, var2);
I have called this in the shell script as:
sqlplus -S << EOF > sqlerrlog
$connection_strring
set serveroutput on;
declare
d varchar2(1);
BEGIN
dbms_output.put_line('IN PL/SQL block');
d:=func(var1, var2);
END;
exit;
EOF
However, this is not only 'NOT WORKING', but does not even enter the
PLSQL block.
If i tried just an SQL statement in place of the PLSQL block, it just
works fine. Also, the PLSQL block works fine when called from the SQL
prompt.
Even a simple dbms_output statement does not work in the PLSQL block
here.
Please let me know if I am getting anything wrong here or let me know how to call the function in the script. Received on Thu Nov 09 2006 - 17:47:28 CET