Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How do you delete duplicate rows......

Author  Topic 

iktheone
Yak Posting Veteran

66 Posts

Posted - 2006-01-18 : 02:03:26
How do you delete duplicate rows when there are constraints or like in professional terms as we say "Referential Integrity".

Mr.Madhivanan i hope you remember me. Because it is after all purpose that binds us all together...purpose...it is inevitable Mr.Madhivanan.

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-18 : 02:20:50
If there is referencial integrity, then you need to delete child table before parent table

Refer this where Nigel suggested many methods
http://sqlteam.com/forums/topic.asp?TOPIC_ID=6256

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-01-18 : 05:11:39
Upgrading to SQL2005 where there is support for 'cascade deletion' may be a prerequisite
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2006-01-18 : 07:44:36
see http://weblogs.sqlteam.com/jeffs/archive/2004/10/07/2190.aspx
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-01-18 : 08:16:30
quote:

Upgrading to SQL2005 where there is support for 'cascade deletion' may be a prerequisite



What are you talking about? You know it's possible without 2005.

You can delete the records. We had this requirement quite frequently when I started at my current company, due to the design of the applications and databases. The two articles (links) given above should give sufficient answers.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

iktheone
Yak Posting Veteran

66 Posts

Posted - 2006-01-19 : 04:40:35
Yup thats right. It is possible. What is new in SQL Server 2005 by the way? Just look and feel? or major functionality changes?
Go to Top of Page

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-01-19 : 07:30:03
"damn this keyboard"....2000...cascade not available in SQL7
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2006-01-19 : 16:41:24
MAJOR functionality changes. Pretty much everything is new or has a major revision. This includes the engine and all major components, along with some new ones. Better start studying.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-20 : 00:33:38
>>What is new in SQL Server 2005 by the way?

http://www.microsoft.com/sql/prodinfo/overview/whats-new-in-sqlserver2005.mspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -