Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting/Deleting duplicates in a table?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi all,
I am trying to delete duplicate records. I know how to select dups using this code:
select * from temptbl A where exists;
(select * from temptbl B where B.dupfield = A.dupfield;
group by dupfield having count(*) > 1 )

I have tried changing this code to delete the records but I cannot get the syntax down.
Can anybody point me in the right direction?

thanks,
scotta
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top