Query Help find match and delete.

  • Thread starter Thread starter Raj
  • Start date Start date
R

Raj

I have a query that I use to verify the [itemid]'s that
are in my database is valid in our corporate database. I
have over 24000 items in my database and I currently put
300 in a table run the query and they append then to a
table. I would like to do is have the query check only
check 300 [itemid]'s and if it find one that is not valid
(in the corporate database add it to a tblinvalid. Then
delete the 300 that it has checked. What is the easy way
to do this?
Thanks..
 
Dear Raj:

I suggest you begin by writing a SELECT query that will find which
rows have rows in them that have duplicate keys. A similar SELECT
query would find those that are not duplicates. You can change these
into INSERT queries to the master table and to the exception table.

If there is any chance that other operations may change the state of
the master table while this is underway then a more complex process
would be needed.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Back
Top