Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

Get Rid of Duplicates! Expand / Collapse
Author
Message
Posted Tuesday, December 1, 2009 10:22 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 28, 2014 5:00 PM
Points: 68, Visits: 279
Yes but there is nothing fantastic about your method; its been long done by many in SQL2K world. Just google and you will find a ton articles ...

cheers.
Post #826853
Posted Tuesday, December 1, 2009 10:30 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 10, 2014 9:53 AM
Points: 8, Visits: 60
Seth,

Thanks. Oh... so.. simple. Gotcha. Makes sense. Just never did a clean dups by deleting them all from the original table.

Yeah, there's tons of ways to deal with dups. Still appreciate you're taking the time to write the article.

Write on!

Richard
Post #826858
Posted Tuesday, December 1, 2009 10:33 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 3, 2009 12:05 PM
Points: 3, Visits: 15
Hey all - can I firstly just join the "I think this is a good article" camp - obviously there are always more than one way of doing things - but assuming you're not always using 2005+ I think this solution is very nice.

One thing I stumbled on in the following discussion this comment "It's not always required to add unique indexes/constraints, though that was a good tip."

Just out of curiosity - if I have a table where I use surrogate PK of some sort (Ints or GUIDs or whatever) I always make sure that I also have a natural key in the form of a unique index - so say it's a Person table I might place this on the email, if it's an Order table I might place it on the Customer and TimePlaces etc.

I normally go to quite some length to do this, mainly just because I was once taught this was good practise - and also because I find it traps a lot of application logic errors that would otherwise go unnoticed.

Now I should say that I am an application developer and not a DBA - so I am actually quite interested in hearing your opinion on this.
Post #826860
Posted Tuesday, December 1, 2009 11:38 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:47 PM
Points: 35,770, Visits: 32,436
G33kKahuna (12/1/2009)
Seth,

this is an age old dilemma and was put to rest with many variations like JP de Jong-202059 pointed out. In fact this site has articles with script to perform the same task. Stop wasting our time with your eureka moments ....


Heh... man... you don't need be to be so rude. Most everything that folks write an article having to do with SQL Server are all "age old dilemma's" and yet nothing is truly at rest. A newbie might stumble into the discussion that follows such an article and actually learn something new.


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #826889
Posted Tuesday, December 1, 2009 12:36 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 28, 2014 5:00 PM
Points: 68, Visits: 279

Heh... man... you don't need be to be so rude. Most everything that folks write an article having to do with SQL Server are all "age old dilemma's" and yet nothing is truly at rest. A newbie might stumble into the discussion that follows such an article and actually learn something new.


Jeff,

with all due respects, there is nothing new to learn in the article. It's done, closed and available across the internet ... here is a simple google search ..

Those were the days when SSC had interesting articles everyday; these days anyone with access to internet and oxygen is dumping garbage on the site. I wish SSC moderated articles post more ...
Post #826937
Posted Tuesday, December 1, 2009 1:12 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, December 3, 2009 12:05 PM
Points: 3, Visits: 15
Well don't read it then - the only thing that's worse than low quality forum posts is people poncing about complaining about how offended their intellect is by this terrible posts that they are having to read.

If you know how to find duplicates then yes - you probably should stop reading articles about how to find duplicates.

And before you get all huffed up and spend all night drafting your reply - that's my final word on the matter!

Cheers mate! :0)
Post #826980
Posted Tuesday, December 1, 2009 1:28 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 28, 2014 5:00 PM
Points: 68, Visits: 279
tpoulsen (12/1/2009)
Well don't read it then - the only thing that's worse than low quality forum posts is people poncing about complaining about how offended their intellect is by this terrible posts that they are having to read.

If you know how to find duplicates then yes - you probably should stop reading articles about how to find duplicates.

And before you get all huffed up and spend all night drafting your reply - that's my final word on the matter!

Cheers mate! :0)


Ditto to you .... don't like my comments ... move on ...
Post #826997
Posted Tuesday, December 1, 2009 1:30 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:47 PM
Points: 35,770, Visits: 32,436
G33kKahuna (12/1/2009)

Heh... man... you don't need be to be so rude. Most everything that folks write an article having to do with SQL Server are all "age old dilemma's" and yet nothing is truly at rest. A newbie might stumble into the discussion that follows such an article and actually learn something new.


Jeff,

with all due respects, there is nothing new to learn in the article. It's done, closed and available across the internet ... here is a simple google search ..

Those were the days when SSC had interesting articles everyday; these days anyone with access to internet and oxygen is dumping garbage on the site. I wish SSC moderated articles post more ...


With the same respect, you don't stike me as an SSC 'old timer' ("Those were the days...") with a whopping big 139 posts. Heh... and there are other things to learn about from such an article like the rare alternate method found in the discussions that follow or the human element that causes people to waste their time flaming about such articles. At least the guy tried... how many articles have you written?

Instead of offering a Google link on this subject, take a look at item 6 in the following article...
http://www.ehow.com/how_2106033_use-proper-forum-etiquette.html


--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #826998
Posted Tuesday, December 1, 2009 1:54 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 28, 2014 5:00 PM
Points: 68, Visits: 279
Sad isn't it when my forum posts offer more challenge and value .....

cheer,
Post #827017
Posted Tuesday, December 1, 2009 2:36 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Yesterday @ 8:47 PM
Points: 35,770, Visits: 32,436
Heh... nah... it's just the human element on a (thankfully) open forum. Sometimes ya just gotta play the ol' Jedi mind trick on your self... "These are not the droids I want... I'll move along."

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #827045
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse