Delete Query Criteria based off a table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello All -

I am trying to do a delete query where the criterion is
based of a field in another table. For example, I am
trying to delete from a budget table where the department
numbers equal the department numbers listed in a
department listing table. Any ideas?

Thanks,
Dion
 
The SQL String should be something like:

DELETE DISTINCTROW tblBudget.*
FROM tblBuget INNER JOIN tblDepartment
ON tblBudget.frg_DeptID = tblDepartment.DeptID

Are you sure you want to do such a deletion? If you have
set R.I. between the 2 Tables, this vitrually means you
will delete all Records in the tblBudget.

Keep back-ups and try with a *copy* of your database.

HTH
Van T. Dinh
MVP (Access)
 
Back
Top