By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,211 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

Delete Non Matching Records

P: n/a
Hi all,

I have two tables that are related to each other.
One has 30K records while the other has 500.
I ran a 'Without Matching' query to find records in the larger table
that didn't have a matching record in the smaller table, however now I
want to delete those records. Is there an easy way to do this?

Thanks,
Bill

May 2 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
turn the select query into a delete query?

May 2 '06 #2

P: n/a
Great! Thanks so much. Works just fine.

(Just goes to show how much I have to learn!)

Bill

May 2 '06 #3

P: n/a
kl*****@hotmail.com wrote:
I have two tables that are related to each other.
One has 30K records while the other has 500.
I ran a 'Without Matching' query to find records in the larger table
that didn't have a matching record in the smaller table, however now I
want to delete those records. Is there an easy way to do this?


Bill - not a direct answer to your question, but I would refer you to
the recent "Relationships. Does anyone use them?" thread. After you've
gotten rid of your orphaned records, to avoid future occurances, set up
a relationship to enforce referential integrity between the two tables.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
May 2 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.