Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple SQL statements in one query?

Status
Not open for further replies.

muneco

Programmer
Nov 6, 2000
28
US
Hi,

I am creating a series of Access 2000 queries to create and populate a database. I was wondering if it is possible to put multiple SQL statements in one query.

For example, can I say something like

create table table1 (fld1 autoincrement primary key, fld2 text);
insert into table1 (fld2) values ("widgets");


Or do I need to create two separate queries, one for each statement? Your help and expertise will be appreciated.
 
Only one statement per query. You can, however, check out the Execute method of the docmd object, which you could use in code to do as many different things as you want.

Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
Affordable Development, Professionally Done

Please post in the appropriate forum with a descriptive subject; code and SQL, if referenced; and expected results. See thread181-473997 for more pointers.
 
Thanks Jeremy, I appreciate your reply.

Best wishes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top