Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> PL SQL code bad structured resulting in unique key violation
Hi,
I've seen some PL-SQL code utterly flawed, to sum it up it looks like:
[pseudocode]
procedure p1 is
CURSOR cur1 is
SELECT ... FROM TABLE1, ....
;
CURSOR cur2 is
SELECT ...
;
BEGIN
END; The problem is that cur1 shouldn't be reading the registers inserted in the loop, is there any general way to prevent cur1 to read the registers inserted into TABLE1 in the current transaction? I'm aware that the best way to sort it out is to rearrange the whole procedure, but it's huge and subtle.
Thanks in advance
David
Received on Wed Jun 28 2006 - 03:21:21 CDT