Need join to merge last dated record in related table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two tables that are related table A and table B. Table B contains
records that are date/time stamped.
What I need to do is to join the rows in table A with the last (in date/time
sequence) applicable record in table B.
How could I do this?
I'll be using SQL not the query builder.
 
I have two tables that are related table A and table B. Table B contains
records that are date/time stamped.
What I need to do is to join the rows in table A with the last (in date/time
sequence) applicable record in table B.
How could I do this?
I'll be using SQL not the query builder.

SELECT A.*, B.*
FROM A INNER JOIN B
ON A.joinfield = B.joinfield
WHERE B.datefield = (SELECT Max([datefield]) FROM B AS BPLUS
WHERE BPLUS.joinfield = B.joinfield);


John W. Vinson [MVP]
 
Back
Top