I have a stored procedure. I want to call a function from it. Want to pass the retrieved cursor record to the function. how can i pass the retrieved cursor record as function argument and how can i access it inside the function? How do i declare the function?
CREATE OR REPLACE PROCEDURE service__update as
cursor c_getData is select * from service_1 where status=5 ; begin dbms_output.enable(null); for rec in c_getData loop function(rec)
Best Answer
Assuming that you really want a function (which implies that you want to return a value) rather than a procedure (which does not return a value) and assuming that your cursor really is selecting every column from a single table, you can declare a function that takes an anchored
%ROWTYPE
and then call that function from your procedure