Equivalent to VBA DoEvents - Newbie Question

  • Well actually in your case it would be to clean the select in the first place. Deduplication has many forms and purpuses so I can't give you a canned answer for that one.

  • The WHERE NOT EXISTS() works fine to prevent duplicate inserts into the table as long as the set you are inserting also doesn't have duplicates in it.

    You have the pre-qualify the set of data being inserted for duplicates also.

    There have been many very fine posts on this forum on how to de-duplicate data.

    Todd Fifield

  • Is it echo in here :Whistling:?

  • Ninja's_RGR'us (11/30/2011)


    Is it echo in here :Whistling:?

    Remi,

    What I meant was that WHERE NOT EXISTS () prevents an insert based on what's in the SELECT list already existing in the destination table. The SELECT list itself may contain duplicates (I've run across this many times) and will blow up on a PK violation when the INSERT is attempted. The SELECT list needs to be de-dup'd within itself if there is any possibility that it contains duplicates.

    Todd Fifield

  • >>>>>

    Ninja's_RGR'us (11/30/2011)


    Well actually in your case it would be to clean the select in the first place. Deduplication has many forms and purpuses so I can't give you a canned answer for that one.

    :hehe:

    Forgot your glasses 😉

  • Ninja's_RGR'us (12/2/2011)


    >>>>>

    Ninja's_RGR'us (11/30/2011)


    Well actually in your case it would be to clean the select in the first place. Deduplication has many forms and purpuses so I can't give you a canned answer for that one.

    :hehe:

    Forgot your glasses 😉

    Dang!

    Maybe I will go for that laser surgury!

    Todd Fifield

  • Ya I had that surgury 12 years ago, really nice!

Viewing 7 posts - 16 through 21 (of 21 total)

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