Mass Record Delete Statementr

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
 
D

Douglas J. Steele

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)
 
G

Guest

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
 
D

Douglas J. Steele

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.
 
B

Burt

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
[email protected].
 
Top