Home » SQL & PL/SQL » SQL & PL/SQL » Duplicate key error on merge with unique source data  () 1 Vote
Duplicate key error on merge with unique source data [message #196942] Mon, 09 October 2006 05:11 Go to next message
info@m-kreft.de
Messages: 1
Registered: October 2006
Junior Member
Hi,

I'm getting a duplicate key error under certain circumstances. Please look at the attached file and give me your opinion on it.


Thanks in advance.

M.Kreft
  • Attachment: OraFaq.out
    (Size: 12.24KB, Downloaded 181 times)
Re: Duplicate key error on merge with unique source data [message #196946 is a reply to message #196942] Mon, 09 October 2006 05:32 Go to previous message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
I think you're on dodgy ground trying to use global variables like this. Oracle performs merge statements in a complex way - it isn't necessarily a simple row by row processing, so you're not guaranteed to have your variable set correctly at all times. Even taking out the unique constraint, the job fails with the error:

ORA-30926: unable to get a stable set of rows in the source tables
Previous Topic: query Filter
Next Topic: want to shift row
Goto Forum:
  


Current Time: Mon Dec 05 23:47:49 CST 2016

Total time taken to generate the page: 0.27511 seconds