我有两个疑问。我需要生成第三个查询,该查询删除在两者中都找到 Child Name 的所有行。因此,如果 [Child Not Seen_Pull].[Child_Name] 与新查询中的 [Child Seen_Pull].[Child_Name] 匹配,则删除符合条件(匹配名称)的行。我是 Access 新手,所以我不确定如何在 Access SQL 中编写它。
* *查询 1 [Child Not Seen_Pull] **
SELECT [Child Not Seen_Clean].ID, [Child Not Seen_Clean].[Case ID], [Child Not Seen_Clean].Child_Name, [Child Not Seen_Clean].[Worker Site / Unit], [Child Not Seen_Clean].[Worker Name], [Child Not Seen_Clean].[Worker Role], [Child Not Seen_Clean].[Contact Date], [Child Not Seen_Clean].[Contact Method], [Child Not Seen_Clean].[Contact Result], [Child Not Seen_Clean].Focus, [Child Not Seen_Clean].Participant
FROM [Child Not Seen_Clean]
WHERE ((([Child Not Seen_Clean].[Contact Method])<>"Face To Face") AND (([Child Not Seen_Clean].Participant)<>"Yes")) OR ((([Child Not Seen_Clean].[Contact Method]) Is Null)) OR ((([Child Not Seen_Clean].[Contact Method])="Face to Face") AND (([Child Not Seen_Clean].[Contact Result])="Attempted")) OR ((([Child Not Seen_Clean].[Contact Method])="Face to Face") AND (([Child Not Seen_Clean].[Contact Result])="Contacted") AND (([Child Not Seen_Clean].Focus)="Yes") AND (([Child Not Seen_Clean].Participant)="No")) OR ((([Child Not Seen_Clean].[Contact Method])="Phone") AND (([Child Not Seen_Clean].[Contact Result])="Contacted") AND (([Child Not Seen_Clean].Focus)="Yes")) OR ((([Child Not Seen_Clean].[Contact Method])="Fax") AND (([Child Not Seen_Clean].[Contact Result])="Contacted") AND (([Child Not Seen_Clean].Focus)="Yes")) OR ((([Child Not Seen_Clean].[Contact Method])="Phone") AND (([Child Not Seen_Clean].[Contact Result])="Attempted") AND (([Child Not Seen_Clean].Focus)="Yes")) OR ((([Child Not Seen_Clean].[Contact Method])="Mail") AND (([Child Not Seen_Clean].[Contact Result])="Attempted"))
ORDER BY [Child Not Seen].[ID];
查询 2
SELECT [Child Not Seen_Clean].[ID], [Child Not Seen_Clean].[Case ID], [Child Not Seen_Clean].Child_Name, [Child Not Seen_Clean].[Worker Site / Unit], [Child Not Seen_Clean].[Worker Name], [Child Not Seen_Clean].[Worker Role], [Child Not Seen_Clean].[Contact Date], [Child Not Seen_Clean].[Contact Method], [Child Not Seen_Clean].[Contact Result], [Child Not Seen_Clean].Focus, [Child Not Seen_Clean].Participant
FROM [Child Not Seen_Clean]
WHERE ((([Child Not Seen_Clean].[Contact Method])="Face To Face") AND (([Child Not Seen_Clean].[Contact Result])<>"Attempted") AND (([Child Not Seen_Clean].Participant)="Yes"))
ORDER BY [Child Not Seen].[ID];