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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

duplicate rows in table

Status
Not open for further replies.
Jun 27, 2002
47
TT
which keyword can i use to create a query for removing duplicate rows
 
distinct Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
i'll try try that but i was using a select query like this one

select [date], [location]
from [call info]
group by [date]
having (count([date])>1)

but that didn't work as it should have....

i even tried a delete query

i didn't even bother with distinct i thought i wouldn't be able to delete the duplicate rows...
 
select [date], count(*) as myCount
from [call info]
group by [date]
having (count(*)>1)

Has worked for me before..... but maybe not?
 
The following will identify the duplicates in the table based on two columns.

select [date], [location]
from [call info]
group by [date], [location]
having count(*)>1
Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top