Deleting all data from B_E database tables. (AC2003) (2 Viewers)

raggajunglist

Registered User.
Local time
Today, 01:51
Joined
Aug 30, 2007
Messages
40
Hi all,

Im trying to write a query so that all data in all but two tables is deleted, not the tables themselves only the data.

I keep getting these errors when im trying to build a suitable query..

COULD NOT DELETE FROM SPECIFIED TABLES
or
TOO MANY FIELDS DEFINED

With any luck i'd like to able to have this query run automatically each day is there any way to do that or do i have to repost in vba section?

Thanks for reading!!
 

rainman89

I cant find the any key..
Local time
Today, 04:51
Joined
Feb 12, 2007
Messages
3,015
have you tried

Delete * from Tablename ?

making sure u change tablename to the name of your table?
 

Rabbie

Super Moderator
Local time
Today, 09:51
Joined
Jul 10, 2007
Messages
5,906
To delete all the data in a specific table run this query

DELETE * FROM TableName;

This will empty the whole table.

If you have more than 1 table to empty just run the required number of queries.
 

Users who are viewing this thread

Top Bottom