By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,081 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

DROP Table for multiple tables?

P: 1
In Access 2003, is it possible to delete multiple tables using a QUERY?

I want to delete multiple tables but i guess i cant use wildcards with DROP

i..e DROP TABLE mytable1% or something like that?

I know i can do this using VB etc but i am looking if its doable using some query only?

Thanks for your help.
Nov 22 '06 #1
Share this Question
Share on Google+
9 Replies


NeoPa
Expert Mod 15k+
P: 31,307
I believe not.
In T-SQL (MS SQL Server) it's possible to include multiple SQL statements separated by the ';' character.
Not in Access though, I'm afraid.
Nov 22 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
In Access 2003, is it possible to delete multiple tables using a QUERY?

I want to delete multiple tables but i guess i cant use wildcards with DROP

i..e DROP TABLE mytable1% or something like that?

I know i can do this using VB etc but i am looking if its doable using some query only?

Thanks for your help.
In theory you can so it using a function. It all depends on how you obtain the list.

Where are you getting, or how are you deciding on the list of table to be deleted?

Essentially you would pass this list to a recordset and using a loop to DROP table .. current table in recordset.

Mary
Nov 22 '06 #3

NeoPa
Expert Mod 15k+
P: 31,307
That would probably qualify as VB code though Mary ;)
Nov 22 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
That would probably qualify as VB code though Mary ;)
Damn, missed the last line again.

OK, is this table in Access only or is there an odbc backend. I'm thinking of pass-thru sql queries of course.

Mary
Nov 22 '06 #5

MMcCarthy
Expert Mod 10K+
P: 14,534
Damn, missed the last line again.

OK, is this table in Access only or is there an odbc backend. I'm thinking of pass-thru sql queries of course.

Mary
Forget it, it wouldn't solve the link problem anyway.

OK, answer is No.

Nov 22 '06 #6

NeoPa
Expert Mod 15k+
P: 31,307
Sussed again Mary!
I know you're just trying to emulate human fallibility.
Nov 22 '06 #7

MMcCarthy
Expert Mod 10K+
P: 14,534
Sussed again Mary!
I know you're just trying to emulate human fallibility.
Bug in my programming? Quick, get the technicians, I'm broken.
Nov 22 '06 #8

NeoPa
Expert Mod 15k+
P: 31,307
Bug in my programming? Quick, get the technicians, I'm broken.
Rather, a super-sophisticated mimicry chip applied and tested perfectly.
No cause to wake KUB from his flu-bed :D.
Nov 22 '06 #9

MMcCarthy
Expert Mod 10K+
P: 14,534
Rather, a super-sophisticated mimicry chip applied and tested perfectly.
No cause to wake KUB from his flu-bed :D.
Great, I can get back to my world domination plans. I'm so relieved...
Nov 22 '06 #10

Post your reply

Sign in to post your reply or Sign up for a free account.