Error Reporting from Query Anaylser

  • Hi

    I've developed a stored procedure to insert a record into a table. If the record already exists, the stored procedure performs an update instead. It works fine, but I'm getting the "Violation of PRIMARY KEY constraint" error reported. Is there anyway I can turn this off?

    Thanks

    Andy

  • I would do an IF EXISTS on the primary key before you do the insert.

    Darren


    Darren

  • Also, is the update changing a field in the primary key? That could cause the dup insert.

    Darren


    Darren

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply