selecting unique records

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top