Automatically remove table from append query

  • Thread starter Thread starter LH
  • Start date Start date
L

LH

After runing an append query I want the (from) table to be removed to help
prevent creating duplicate records the next time the query is run.
 
After runing an append query I want the (from) table to be removed to help
prevent creating duplicate records the next time the query is run.

Do you want to *remove the table itself* - all the data *and* the structure?
Or do you just want to empty the table, deleting all the records which were
added?

I'd prefer the latter, which can be done easily using a delete query

DELETE * FROM sourcetable;

or, better, to prevent deleting records which didn't append

DELETE sourcetable.*
FROM sourcetable
INNER JOIN targettable
ON sourcetable.primarykeyfield = targettable.primarykeyfield;
 
Back
Top