Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Unix shell script capturing return value of stored procedure
How do you write a shell script (ksh) to capture a return value from a stored function? If I have the following test fucntion...
FUNCTION TESTME ( inName in VARCHAR2 ) RETURN NUMBER
IS
tmpVar NUMBER;
BEGIN
tmpVar := 321;
RETURN tmpVar;
END TESTME;
And a script that looks like...
sqlplus user/pwd <<PROCESS
declare
proc number;
begin
proc := TESTME ('$file');
exit proc
end;
PROCESS
echo $?
I get the value 0 back which is incorrect.
Any ideas?
Sent via Deja.com
http://www.deja.com/
Received on Mon Jan 08 2001 - 12:16:55 CST