Queries for thousands of records

C

CD27

If I overlooked this topic being discussed previously I apologize.
Basically, I have table in Access 2003, that contains an ID field
(800,000+ numerical IDs). I have a list of about 5,000 IDs which I
need to extract/filter from the 800,000 + IDs. I am at a lost of how
to pull such a large number without doing it manually 5,000 times.
What would be the best way of doing this?

Thank you

CD
 
R

Rick Brandt

CD27 said:
If I overlooked this topic being discussed previously I apologize.
Basically, I have table in Access 2003, that contains an ID field
(800,000+ numerical IDs). I have a list of about 5,000 IDs which I
need to extract/filter from the 800,000 + IDs. I am at a lost of how
to pull such a large number without doing it manually 5,000 times.
What would be the best way of doing this?

Thank you

CD

Is this list in another table? If so you just create a query joining those
two tables on the ID field.


SELECT MainTable.*
FROM MainTable INNER JOIN SecondTable
ON MainTable.ID = SecondTable.ID

A query like above will return all records from the big table that have a
matching ID in the smaller one.
 
C

CD27

Is this list in another table? If so you just create a query joining those
two tables on the ID field.

SELECT MainTable.*
FROM MainTable INNER JOIN SecondTable
ON MainTable.ID = SecondTable.ID

A query like above will return all records from the big table that have a
matching ID in the smaller one.

Thank you for your quick reply. I don't know why I didn't think of
doing that.

Have a good day.
 
Top