View Full Version : Unions not allowed in a subquery


JiggyPig
03-23-2002, 02:07 AM
Help in Access 97 states:

-------------

Unions not allowed in a subquery. (Error 3361)

You can't use a UNION operation in a subquery expression. To use a union query in a subquery, first create the union query and save it as a named query. Then include the name of the saved query in your subquery expression.

-------------

What is the syntax for calling a saved query in another query?

When I try:

SELECT *
FROM table
WHERE column IN
(
saved_query
);

it asks me to enter the parameter value for 'saved_query'.

How do I make it recognise that 'saved_query' is a saved query?

Fornatian
03-23-2002, 05:25 AM
Just a guess but try:

SELECT *
FROM table
WHERE column IN
(Select * saved_query
);

JiggyPig
03-23-2002, 11:17 AM
D'oh!

Easy isn't it?