RichO
Registered Yoozer
- Local time
- Today, 17:28
- Joined
- Jan 14, 2004
- Messages
- 1,036
I'm looking for help on using a delete query to remove old records from a table.
We have one table with all of our employee information and a second table containing their pay scale. The two tables are linked by the employee's social security number.
When we remove an employee from the system, their pay data still remains in the second table and it is somewhat cluttered with outdated data. I have since changed the form to remove the pay information upon a delete but I'm now looking for a way to get rid of the old data. I would imagine I can easily do this with a delete query but I am missing a piece of the puzzle...
DELETE * FROM tblEmployeePay WHERE tblEmployeePay.EmployeeID (... does not exist in tblEmployees)
Thanks.
We have one table with all of our employee information and a second table containing their pay scale. The two tables are linked by the employee's social security number.
When we remove an employee from the system, their pay data still remains in the second table and it is somewhat cluttered with outdated data. I have since changed the form to remove the pay information upon a delete but I'm now looking for a way to get rid of the old data. I would imagine I can easily do this with a delete query but I am missing a piece of the puzzle...
DELETE * FROM tblEmployeePay WHERE tblEmployeePay.EmployeeID (... does not exist in tblEmployees)
Thanks.