Re: Q re Subqueries (Join Predicate) in Access
- From: Simon Woods <simonjwoods@xxxxxxxxxxx>
- Date: Thu, 11 Sep 2008 16:30:45 +0100
Roger Carlson wrote:
This might work:
SELECT t1.Key, t1.Col1, t1.Col2, t1.Col3, Count(e1.Key), Max(e1.Col1)
FROM Table1 t1
LEFT JOIN
[SELECT Key, Col1
FROM Table2
WHERE Col2 =3]. as e1
ON t1.Key = e1.Key
GROUP BY t1.Key,t1.Col1, t1.Col2, t1.Col3
Haven't tested it and it might take some fiddling. On my website (www.rogersaccesslibrary.com), is a small Access database sample called "SubQueryInFROM.mdb" which explains how to put a subquery in a From clause. You can find it here: http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=259
Excellent ... pretty much worked out of the box
Thank you eveyone
.
- Follow-Ups:
- Re: Q re Subqueries (Join Predicate) in Access
- From: Roger Carlson
- Re: Q re Subqueries (Join Predicate) in Access
- References:
- Q re Subqueries (Join Predicate) in Access
- From: Simon Woods
- Re: Q re Subqueries (Join Predicate) in Access
- From: Roger Carlson
- Q re Subqueries (Join Predicate) in Access
- Prev by Date: Re: Query changes on its own
- Next by Date: RE: Help with an update query using an if statement
- Previous by thread: Re: Q re Subqueries (Join Predicate) in Access
- Next by thread: Re: Q re Subqueries (Join Predicate) in Access
- Index(es):
Relevant Pages
|