|
Hello,
I have the same "problem" as described in ( http://stackoverflow.com/questions/1078280/last-record-of-join-table ): I need to join a "Master Table" with a "History Table" whereas I only want to join the latest (by date) Record of the the history...
Started by jan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Select M.*, H.* From Master M Join History H On H.PK = (Select Max(PK) From History Where FK = M.PK And Date = (Select....
If the history table has a Primary Key (and all tables should), you can modify the subselect the date criteria...
|