General information
Category:
Triggers, Sequences and Stored Procedures
Ok, here is what I need.
I need a stored procedure that will lock a record in a table (called sys_ctrl). I am passing a parameter to it. I need to record locked until I get the next id from (cId char(15)) by calling an other function that increments my ID, saves it back to sys_ctrl table and then returns that Id.
I pretty much have the incrementing procedure/fuction done, but I can't figure out how to lock the table. I have tried the DECLARE FOR UPDATE but no matter where I put it, (PROCUEDRES, PACKAGES, ETC) I get errors. Please help.
Where do I do the declare statement??? in a fuction?? in a procedure?? I am very green at oracle stored procedures.
Thanks
Mark
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only