This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am not sure if this is appropriate forum to post this issue, but in case you have idea, please share your view,
I am trying to write db2 SQL (Merge statement),
Above SQL works till line 4, but if I run full statement, I am getting error 23505 - A violation of the constraint imposed by a unique index or a unique constraint occurred.
But there is no such record having id as PX.
If I run following, I am able to insert
The WHEN NOT MATCHED clause will insert one row for every unmatched row in the source table. If there is more than one unmatched record, you'll get PK violation, because you are inserting constant values.