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

select NOT distinct

Status
Not open for further replies.

gtbikerider

Technical User
Joined
May 22, 2001
Messages
81
Location
GB
I have a list of subscribers (email, name, id). Trouble is there are duplicates. How do I select email, name, id where the email is not distinct (ie a duplicate)? --
John Carratt
 
you can try a GROUP BY clause

GROUP BY EMAIL, NAME, ID

or you can cancatnate the three fields together and use DISTINCT() on them.(syntax depends on the database type)

SELECT DISTINCT(EMAIL+NAME+ID) AS DISTINCT_FIELD

either should work, i think.
Randall2nd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top