Hi,
I'm basically trying to join a table to a query. The problem is, I'd like to do it all in one statement. A simple subquery doesn't work because I need to join two fields to make this work. In MS-Access, this is what it looks like now:
Query:
SELECT TESTTABLE.SEQ, Max(TESTTABLE.DATE) AS MaxOfDATE
FROM TESTTABLE
GROUP BY TESTTABLE.SEQ;
Query Joined to Table:
SELECT TESTTABLE.*
FROM TESTTABLE INNER JOIN MAXQUERY ON ([TESTTABLE].[DATE]=[MAXQUERY].[MaxOfDATE]) AND ([TESTTABLE].[SEQ]=[MAXQUERY].[SEQ]);
Here is the source table:
ID SEQ DATE TEXTIEM
1 1 12/1/2003 Is this a question?
2 1 11/1/2003 Was this a question?
3 2 12/1/2003 Are you ugly?
4 2 11/1/2003 Is your mother ugly?
Here is the desired return:
ID SEQ DATE TEXTIEM
1 1 12/1/2003 Is this a question?
3 2 12/1/2003 Are you ugly?
Help would be greatly appreciated (in peanuts, of course)
Tom