November 30, 2011 at 5:50 am
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.
November 30, 2011 at 11:16 am
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
November 30, 2011 at 11:20 am
Is it echo in here :Whistling:?
December 2, 2011 at 12:52 pm
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
December 2, 2011 at 3:37 pm
>>>>>
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 😉
December 2, 2011 at 6:04 pm
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
December 2, 2011 at 6:21 pm
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