If you're importing a new table in consistently. What do most of you experienced with this would say is the most effective and clean method to wipe the old data?
If you're importing a new table in consistently. What do most of you experienced with this would say is the most effective and clean method to wipe the old data?
I typically use
CurrentDb.Execute "DELETE * FROM TableName"
and then import the new data into the table.
Thanks I'll have to try that.
I'm pretty new to most VBA. I just thought before when I did a delete query it erased not only the data but the table itself. Am I incorrect in this assumption or is doing this code not exactly one in the same?
A delete query will only delete data, not the table itself. I believe the only SQL that could delete a table would be a DDL query:
"DROP TABLE TableName"
Just for clearing data, delete method is proper.
If it is the case that you don't want the table data and structure any more, then drop table is the answer.