2.4k questions

2.4k answers

99.5k users

Categories

0 votes
70 views

When inserting into a table using a select from another table and creating an error with a duplicate key, is it possible to find the value of the key that was duplicated?
in General by (95.8k points)

1 Answer

0 votes

better to use a loop like

START THE LOOP:

  • read the record
  • check if key exists
  • if not insert
  • if yes write to table PROBLEMATIC_RECS
  • IS THIS LAST RECORD IF YES EXIT

GO TO START THE LOOP

Do something like this with PL/SQL or PHP or PRO*C

by (95.8k points)
...