Re: run queries by the batch



Tonk wrote:
Sorry to pollute the post with so many dumb questions! Until I figure
out how to write queries that accomplish more than 1 thing at a time,
I was wondering if there was any way to automate queries. For
example, I have a delete query that deletes bad data. I run an
update query that changes sex from 2 to 1 if conditions x, y, and z
are met. I run another delete query that checks for missing values.
And so on, and so forth.

I guess what I'm looking for is a way to run a batch file that will
run a series of queries one right after the other.

Am I nuts or does such capability exist?

tonk

In VBA code you can have...

CurrentDB.Execute "FirstQueryName", dbFailOnError
CurrentDB.Execute "SecondQueryName", dbFailOnError
CurrentDB.Execute "ThirdQueryName", dbFailOnError
etc..


--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com


.



Relevant Pages

  • Re: Turn off Messages at bottom of display
    ... and in some cases they were queries of queries and the second ... In the case of one query as listed below, ... The ES is not available to resolve these references for the Execute method. ... dbEngine.Execute strSql, dbFailOnError ...
    (microsoft.public.access.modulesdaovba)
  • Re: Capture number of records updated?
    ... use this method to run each query ... db.execute, strSQL, dbfailonerror ... I know how to run the queries from code, and how to turn off the warnings ...
    (microsoft.public.access.formscoding)
  • RE: Dynamically referencing a recordset?
    ... through that recordset to set the query parameters in VBA. ... to be the one who had to modify 1440 queries if there is a change in the ... different table schema, then you need 3, one for each record type. ... This is a database that tracks the production on records in another ...
    (microsoft.public.access.modulesdaovba)
  • Re: Was: what does "serialization" mean?
    ... > the specific queries up front. ... that the NEXT time the query is run the query is fast, ... data base, don't know squat" when in fact the Donald clone doesn't ... >> WHATEVER would probably be a separate query to summarize total sales. ...
    (comp.programming)
  • Re: Official Status of SQLServer 2005 ADP
    ... I have said that the support for SQL passthrough ... queries under MDB was bad and worst than the one offered by ADP while you ... > attempt to "pass through" every Access query against a linked ODBC ...
    (microsoft.public.access.adp.sqlserver)