Deleting data from multiples tables.

0bsidian

Registered User.
Local time
Today, 17:22
Joined
Feb 17, 2009
Messages
21
I currently use a database into which I import a fair amount of data on a bi-monthly basis. Before I can import that data, I need to delete the existing records from the tables.

I currently do this with a selection of delete queries which I call sequentially through a vb sub.

Is there a better/less query intensive way to do this?

Many thanks for any assistance.

0bs
 
Well perhaps there is a way, if you store all these tables in a seperate backend.

This backend would only contain this updateable information, you have 2 versions of this backend. One you actually use and one "template" which contains only empty tables.
Then upon update instead of deleting you copy the empty one over the filled one.

Not sure its worth the effort though... But... less queries for sure.
 
Import the data in a temporary table.
Delete matching records in the target table (using a single query)
Insert all records from the temporary table.
Delete rows from the temporary table or drop the table.
 

Users who are viewing this thread

Back
Top Bottom