Select certain items in query

  • Thread starter tinamiller1 via AccessMonster.com
  • Start date
T

tinamiller1 via AccessMonster.com

I have a 30k row table. There are dupe tax id's because there are multiple
doctors per an office. I have to run a query to add the phone number and fax
to this 30k row table. The problem is each doctors office has multiple phone
numbers. I only need 1 phone per tax id. When I run the query since they have
tons of phone numbers listed per TIN, I get 418k rows back. I just want a
query to where I can say give me the first number that I run into for the TIN.
I am not sure how to do this. Any suggestions?
 
K

KARL DEWEY

This should do it --
SELECT TIN, First([Phone]) AS [Phone number], First([Fax]) AS [Fax number]
FROM YourTable
GROUP BY TIN;
 

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