Using Subquery for Criteria

J

Jim Pockmire

Is it possible to use a subquery to pass multiple values to a criteria
statement in another query?
 
J

John Spencer

Possibly. An example.

SELECT *
FROM TableA
WHERE TableA.CustomerName IN
(SELECT FullName
FROM TableB
WHERE FullName Like 'Joh*'
GROUP BY FullName
HAVING Count(FullName) > 1)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top