delete a table on query?

derekbeck

Registered User.
Local time
Today, 05:35
Joined
Mar 1, 2012
Messages
16
Hi, I have a database I'm working on, that I inherited, and suffice it to say, there is a database (that we don't own) that we draw data from in the form of an Excel spreadsheet, and then import it into our own Access 2007 database using the import function. We've got it as a saved import, so it isn't terribly difficult. The data goes into a table called "new tasks". We then run an append query, the data is sifted by several embedded queries, and the result is that the newly imported data is checked for duplicates and then appended to our main "tasks" table, including several new columns and such that the original data does not have (which is the reason I guess the designer was forced to import into a separate table).

What I'd like to do is find a way to modify the append query to then wipe clean the "new tasks" table. How do I do this?
 
If I understand correctly, you can't. You would run a delete query after the append query.
 
Okay, and how do I design a delete query?
 
DELETE * FROM TableName
 
Will that delete only the records but keep the fields intact?
 
Did you test? Yes, it will.
 
Thanks, that worked great.

Perhaps you have an answer for my other simple question: access-programmers.co.uk/forums/showthread.php?p=1136422#post1136422 (which is as much about queries as it is about tables)
 

Users who are viewing this thread

Back
Top Bottom