When writing a query for SQL Server, you can declare and use variables like this:
declare @test int
select @test = max(ID) from MyTable1
update MyTable2 set (...) where ID > @test
update MyTable3 set (...) where ID < @test
Is there a way to declare and use variables similarly when writing a query for MS Access?
I need to populate the variable with the result of another query and then use that value to perform insert/update operations. The query will be run from a .NET app.