Cannot Insert Duplicate Keys message

  • I have a stored procedure where I create a temp table and identify two columns as the PK. I receive a message that there I cannot insert duplicate keys into the temp table, even though there is no possible way this select statement can produce duplicates. Has anyone ever seen this before. We've seen it multiple times no matter what we do to try and avoid it, such as using distinct, etc.

    Thanks,

    Jason

  • Hmmm, force is weak. See what you see I can't.

    It would help if you provided us with more information. Based solely on your post, it is extremely difficult to help you debug your problem. Please read and follow the instruction in the first article you will find referenced below in my signature block below regarding asking for assistance.

  • Where I've seen this before, it's either been data already in the table conflicted with the new insert, or the new insert wasn't as clean as expected.

    Have you simply run the select statement as a Group By ... Having count(*) > 1, type construct?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

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

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