UPDATE query based on a saved SELECT query in Acce

2019-07-05 01:55发布

问题:

Using a UPDATE query, is it possible to reference to a stored select query?

I'd like to accomplish something like this:

UPDATE ... WHERE ... IN [MY_STORED_PROCEDURE]

回答1:

Perhaps something on these lines:

UPDATE ...
WHERE ID IN (SELECT ID FROM MyStoredProc)

Depending on your set up, a join may also be possible. You can add stored queries to the query design window, but you do not always end up with an updatable query, it usually depends on your indexes.