Executing Multiple Queries

  • Thread starter Thread starter Ivan Mascovich
  • Start date Start date
I

Ivan Mascovich

I have sequence of update queries I need to execute to set up a databased.
How can I execute other than entering them one at a time?
 
Depends on how similar the queries are to each other. If they differ only in
table and filed names, you could set up a loop in VB code to construct each
query and execute it - provided you can formulate some logical rule on how to
generate the table names, field names and update values (eg. for every table
in the database, get the name of the Nth field and update it to zero).
Otherwise, setting up the arrays to drive this process could be more work
that just writing each query by hand and executing it.
 
Ivan

Not sure what you mean by "entering them one at a time"?

Do you already have the queries built, and are trying to run the sequence?
If so, you could run the set of them in a procedure, or in a macro.
 
Ivan

Not sure what you mean by "entering them one at a time"?

Do you already have the queries built, and are trying to run the
sequence? If so, you could run the set of them in a procedure, or in a
macro.


I have a file containing a sequence of queries. I would like to execute
them in sequence.

If I copy them into the SQL window of the query editor, access does not
like one query after another.
 
Ivan

As my previous response suggested, make them into a series of queries, then
use a procedure or macro to run them sequentially.
 
Back
Top