Mass Record Delete Statementr

  • Thread starter Thread starter Burt
  • Start date Start date
B

Burt

Hi,

Outside of deleting an entire table and creating it
again. Is there a VBA statement, or SQL statement that
would leave a table with no records in it?

Thanks in advance for your answer,

Burt
 
The SQL Statement

DELETE FROM MyTable (or DELETE * FROM MyTable)

will delete every record in the table named MyTable.

(Of course, if you've set referential integrity, it's possible that you
won't be allowed to delete records if there are child records associated
with them)
 
Doug,

Thanks. That worked just great.

Tell me, is there an SQL statement that can perform a mass
input to a table from an external source (i.e. Txt file).

Thanks again,

Burt
 
No, but depending on the nature of the text file, you may be able to import
it throught the wizard. Start at File | Get External Data | Import on your
menu.
 
Doug,

Thanks for getting back to me. I have tried what you
suggested in the past. That works fine if you were only
doing it once, or maybe twice. But when you create a
macro it runs slower then if you simply Input #1, Close #1.

The problem I have is you have to write out all the field
names and match them to a table. It works fine, just
looks pretty elementary. I thought there might be
a "snazzier" way of writing it.

Thanks again,

Burt

P.S. I won't be going back to this message. It's already
on page 5. If you do come across something, I put my e-
mail address above. If you don't see it, it's
(e-mail address removed).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top