Quick and straightforward question:
I am writing a PL/SQL stored procedure. It contains some execute immediate
calls that might fail. I don't want to raise an error. I would like the stored procedure to finish its execution cleanly and return a list of errors. Something like:
for vRecord in vCursor
loop
begin
execute immediate 'insert into t(a) values (' || vRecord.val || ')';
when others then
-- store the error somewhere to return it!!
end;
end loop;
So my question is: what's the recommended way of returning those errors? A Table? An out parameter?
Thanks a lot.