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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How Can I Delete The Duplicate Values From A Table

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2007-05-28 : 09:29:01
Hi,
Please give me query to delete Duplicate Values From A Table.

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-05-28 : 09:42:17
See this: [url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6256[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-05-28 : 10:12:26
always a good idea to check the FAQ first, this is a very common question:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Deleting,Duplicate,Records



www.elsasoft.org
Go to Top of Page

rammohan
Posting Yak Master

212 Posts

Posted - 2007-05-28 : 10:23:39
Thank You

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

Go to Top of Page

rakesh koyadi
Starting Member

3 Posts

Posted - 2007-05-30 : 15:50:57
Hi,
First set the row count to 1 and then delete the duplicate record from the table and then again set the rowcount to 0. see the below example :

create table tab12 (a int)

select * from tab12

insert into tab12 values (1)
insert into tab12 values (1)

--set the rowcount depending on the number of duplicates you want to delete

set rowcount 1
delete from tab12 where a=1
set rowcount 0

select * from tab12

Rakesh


rakesh
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-31 : 01:03:56
quote:
Originally posted by rammohan

Hi,
Please give me query to delete Duplicate Values From A Table.

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN




Simple google search will give you more links

Madhivanan

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

- Advertisement -