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

Selecting unique records only 1

Status
Not open for further replies.

BlueOfficeHead

Programmer
Jul 7, 2004
8
CA
Hello,

I'd like to select the ID, Query and Date from my table,
but would like to see only the unique records based on fldQUERY fields. So if 2 instances of the fldQUERY are the same regardless of any other fields, only one of them would be returned. Is there a way to do so ?

SELECT ID, fldQUERY, fldDATE FROM tbl_google ORDER BY fldDATE DESC
 
Something like this ?
SELECT Max(ID) As myID, fldQUERY, Max(fldDATE) As myDate
FROM tbl_google GROUP BY fldQUERY ORDER BY 3 DESC


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top