I was wondering if there was a way to run multiple SQL Statements in Access like you can in SQL. I have a bunch of steps that I would like to combine in one script.
You can run a query in a query, if that helps. I have a query called qryCollision that is called in the query below. If you use the design grid you can add an existing query as you would a table.
the sql view looks like this where qryCollision is another query (sql statement) which i what i think you want.
SELECT tblResources.ResID, qryCollision.Surname, qryCollision.Firstname, qryCollision.TelExt, qryCollision.StartDate, qryCollision.EndDate
FROM qryCollision RIGHT JOIN tblResources ON qryCollision.ResID = tblResources.ResID
WHERE (((tblResources.ResID) Not In ([qryCollision]![ResID])));
I assume that ... like in SQL ... means stored procedures in SQL server. There are no direct equivalents in Access. You can do what jaydeebe and cmmrfrds suggest or you can write modules (VB Code) to combine SQL statements and logic. They don't operate exactly the same way that stored procedures do but they do provide more options than are available with SQL alone.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.