selecting unique records

  • Thread starter Thread starter Amit
  • Start date Start date
A

Amit

Hi,

This is a follow-up to my post yesterday, and thanks to
Graham for helping me.

Using SQL, how will I select unique records based on 2
fields from a table that has duplicate entries; AND get
rest of the fields for the selected records?

Fields in the table tblOrg are: OrgID, OrgName,
OrgAddress1, OrgAddress2, OrgCity, OrgState, OrgZip.

I'd like to select unique records based on (OrgName and
OrgAddress1), and get values for rest of the fields
(OrgID, OrgAddress2, ...) for the selected records. I've
tried using DISTINCT, but that returns all the records.

Thanks for any help.

-Amit
 
Back
Top