conditional from 2 tables in query

gebuh

Registered User.
Local time
Yesterday, 22:20
Joined
Jun 16, 2006
Messages
21
Happy new year all. I have 2 tables
I have a query that if any tbl2.num=tbl1.num AND tbl2.action = 'confirmed' this row should be selected for deletion from tbl1. I've tried linking the tables and using an iif statement, but no good and I'm not sure what else to do- any ideas?
Forgot to add- tbl1.num might or might not exist on tbl2
 
Last edited:
The sql should look like this

DELETE DISTINCTROW Table1.*, Table2.action
FROM Table2 INNER JOIN Table1 ON Table2.num = Table1.num
WHERE (((Table2.action)="confirmed"));

Look up delete query in help

Brian
 
thank you, I ended up just making a separate delete query- but this modification worked.
 

Users who are viewing this thread

Back
Top Bottom