R
robbie
I have two tables, and want to delete records from one table (table A)
if the date is found in the second table (table B). Here's the table
structures:
Table A:
ID [autonumber]
Date [date]
Sales [number]
Table B:
ID [autonumber]
Date [date]
I want to delete all records from table A where the date is in table B.
What I thought would work was:
DELETE a.*
FROM a INNER JOIN b ON a.date=b.date;
But, this isn't working. I get a "Could not delete from specified
tables" error.
I've also tried using the UniqueRecords option to Yes, but still get
same error.
Any help greatly appreciated.
if the date is found in the second table (table B). Here's the table
structures:
Table A:
ID [autonumber]
Date [date]
Sales [number]
Table B:
ID [autonumber]
Date [date]
I want to delete all records from table A where the date is in table B.
What I thought would work was:
DELETE a.*
FROM a INNER JOIN b ON a.date=b.date;
But, this isn't working. I get a "Could not delete from specified
tables" error.
I've also tried using the UniqueRecords option to Yes, but still get
same error.
Any help greatly appreciated.