Delete Query

  • Thread starter Thread starter gr
  • Start date Start date
G

gr

Hi, to what should I set the Where critria of a Del query
if I only want to delete Records which have no
subdatasheet records?

I have one main table which has 4 subdatasheets. If there
are no records for the corresponding NameID (NameID is in
the main table) in the subtables then delete the item from
the main table.

how?
 
Delete From MainTable where MainTable.Key not in (Select Key from SubTable)
 

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

Back
Top