View Full Version : Deleting Query Question!?!


Kedstar21
05-23-2007, 05:41 AM
Can you delete multiple tables in a delete query? If so, how is this done?

My SQL looks like this....
DELETE TABLE1.*, [TABLE2].*, [TABLE3].*
FROM TABLE1, [TABLE2], [TABLE3];

Logically I thought this is what all I would need to but I keep geeting the error message "Could Not Delete From Specified Tables." Whats going on here? Thanks in advance.

boblarson
05-23-2007, 05:49 AM
No, I don't believe you can delete multiples at the same time as each operation would be separate. One other thing you can use besides the SQL is:

DoCmd.DeleteObject acTable, "YourTableNameHere"

DJkarl
05-23-2007, 05:50 AM
Can you delete multiple tables in a delete query? If so, how is this done?

My SQL looks like this....
DELETE TABLE1.*, [TABLE2].*, [TABLE3].*
FROM TABLE1, [TABLE2], [TABLE3];

Logically I thought this is what all I would need to but I keep geeting the error message "Could Not Delete From Specified Tables." Whats going on here? Thanks in advance.

I don't think you can delete the contents from multiple tables with one query, however if you want to delete the actual tables you can use

DROP TABLE TABLE1,TABLE2,TABLE3

boblarson
05-23-2007, 05:55 AM
I stand corrected about deleting multiple tables with one statement.

Kedstar21
05-23-2007, 05:57 AM
I just want the information in the tables to be deleted and it does not look like it can be done. I will just have to create seperate individual delete queries. Thanks anyway