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
 Transact-SQL (2000)
 remove duplicates from table

Author  Topic 

cognos79
Posting Yak Master

241 Posts

Posted - 2007-01-25 : 00:07:48
I do have a table

id time
----------------
1 12/1/2007 12:00:00:100
1 12/1/2007 12:00:00:100
1 12/1/2007 12:00:00:103

I want to remove the duplicate record. how can i do it.

Expected result:
Id time
-----------------------------
1 12/1/2007 12:00:00:100
1 12/1/2007 12:00:00:103

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-01-25 : 00:12:08
See [url]http://support.microsoft.com/kb/139444[/url]
Also place proper constraints on your tables to avoid getting into such situations.

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

cognos79
Posting Yak Master

241 Posts

Posted - 2007-01-25 : 00:12:44
sorry i am stupid. its been long day. i can just write select distinct and get the results
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-01-25 : 00:13:38
see http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=6256


KH

Go to Top of Page
   

- Advertisement -