This content has been marked as final. Show 5 replies
Welcome to the forum!
Please provide the 4 digit Oracle version (result of SELECT * FROM V$VERSION) for the source and target servers; 10g and 11g are not versions. You also mention sql developer so what is the exact version you are using?
If delete the "OF out_a.ALLOCATION_ID" of the for update clause of CURSOR exist_allocation, this prolbem will not happen, and the code is comple succesfully on sql developer for oracle 10g.
Please clarify what works and what doesn't work because your statements are both incorrect and misleading.
You can't delete the "OF out_a.ALLOCATION_ID" of the for update clause or you would get a syntax error by leaving FOR UPDATE OF with nothing specified after it.
Also you original statement said
But when compile a package which is fine on oracle 10g
But now you say that if you delete the "OF..." the problem doesn't happen and the code compiles on 10g.
Does the original code compile on 10g or not? Does it compile on 11g or not? After the original code is migrated to 11g does it compile? That is, the code is there can you manually compile it?
Thank you for the reply. Here is the version info
oracle 11g: 184.108.40.206.0
oracle 10g: 10.2.0.1.0
sql developer: 220.127.116.11.69/ 3.0.04.34
We tried on sql developer of different version and SQL plus also have this issue. But if we delete the "of out_a.ALLOCATION_ID " to make the "select for update of ..." to "select for update", I mean delete all the statements after "FOR UPDATE" rather than "FOR UPDATE OF with nothing specified after it" and this package can compile succesfully! But I don't think the original code have any syntax error as original code can compile on 10g.After that I also try to keep the "select for update of" and delete some other code, and I found modify some other code in this procedure can also lead to compile succefully.I don't think code is the root cause.But the strange thing is other procedures except DELETE_MANU_INTERV_BORROWS proc will not cause this problem in this package.
You didn't answer the other questions
Does the original code compile on 10g or not? Does it compile on 11g or not? After the original code is migrated to 11g does it compile? That is, if the code is there can you manually compile it?
Can you compile the original code on 10g manually using sql*plus or not?
Can you compile the original code on 11g manually using sql*plus or not?
We can compile the original code on 10g manually using sql*plus. I think this issue may related to some bug on oracle.
Not a JDBC question. Locking.