G
Guest
I'm trying to delete records in Table 1 (Appointments) which are linked to
Table 2 (Leads). So I created a query that says:
DELETE Appointments.*, Appointments.ApptStatus, Leads.Updated, Leads.Source
FROM Appointments INNER JOIN Leads ON Appointments.LeadID = Leads.LeadID
WHERE (((Appointments.ApptStatus)="A" Or (Appointments.ApptStatus)="B" Or
(Appointments.ApptStatus)="C" Or (Appointments.ApptStatus)="D" Or
(Appointments.ApptStatus)="E") AND ((Leads.Updated)>Date()-2) AND
((Leads.Source)="X"));
However, I keep getting an error: Couldn't Delete From Specified Table.
I want this query to remove the records in Table 1 based on the selection
criteria.
Table 2 (Leads). So I created a query that says:
DELETE Appointments.*, Appointments.ApptStatus, Leads.Updated, Leads.Source
FROM Appointments INNER JOIN Leads ON Appointments.LeadID = Leads.LeadID
WHERE (((Appointments.ApptStatus)="A" Or (Appointments.ApptStatus)="B" Or
(Appointments.ApptStatus)="C" Or (Appointments.ApptStatus)="D" Or
(Appointments.ApptStatus)="E") AND ((Leads.Updated)>Date()-2) AND
((Leads.Source)="X"));
However, I keep getting an error: Couldn't Delete From Specified Table.
I want this query to remove the records in Table 1 based on the selection
criteria.