Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Creating Stored Procedure

737934Nov 30 2009 — edited Nov 30 2009
Hi, 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
This post has been answered by Centinul on Nov 30 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2009
Added on Nov 30 2009
3 comments
318 views