Creating Stored Procedure
737934Nov 30 2009 — edited Nov 30 2009Hi, i am creating my first stored procedure and really need some help...i have managed to put together the following:
CREATE OR REPLACE PROCEDURE DRL_PROCEDURE(var_SOURCE_OBJECTID IN varchar2, var_NEW_OBJECTID OUT varchar2)
IS
var_temp_newobjectid varchar2(20);
BEGIN
SELECT MAX(NEW_OBJECTID)
INTO var_temp_newobjectid
FROM DRL_CONVERSION
WHERE SOURCE_OBJECTID = var_SOURCE_OBJECTID;
var_NEW_OBJECTID := var_temp_newobjectid;
return;
END;
I'm not sure if this is correct however, i've tried executing it with the following but when it does execute no results show...it just says procedure successfully completed:
VARIABLE RETVAL VARCHAR2(20)
EXEC DRL_PROCEDURE('ab',:RETVAL);
Do i need to change it somehow to make it show the result?
Also if you know how i can call the procedure in C# and show the result that way that would be equally helpful...thanks