I always have trouble when I need to create a query which will not be stored in Access and call on that query from another query. Today, I need to delete records in a table based on criteria in a table. Here is the query which does not work:
In plain english, I want to delete records from specData if they are related to specMaster.smID = 1. specMaster is not directly related to specData. There is a table which sits in the middle between them, specColumn.
Thank advance for your help
MrsBean
Code:
Delete specData.sdID
from specData INNER JOIN ((SELECT specData.sdID
FROM (specMaster INNER JOIN specColumn ON specMaster.smID = specColumn.colsmID) INNER JOIN specData ON specColumn.columnID = specData.scID) as Q1) ON specData.sdID = Q1.sdID
In plain english, I want to delete records from specData if they are related to specMaster.smID = 1. specMaster is not directly related to specData. There is a table which sits in the middle between them, specColumn.
Thank advance for your help
MrsBean