Hi,
I have returned to Access and SQL after some time away and cannot for the life of me remember how to do something which should be easy enough, if only my little grey cells were operating efficiently ...
I have two tables; one for documents, the other for versions of those documents (simplified field structure):
tblDocs - docNum [PK], docName
tblVers - docNum + versNum + revNum [PK], lastModDate
So, given the following tblDocs data:
1001 | Document One
1002 | Document Two
1003 | Document Three
and the related tblVers data (shown in descending key sequence):
1001 | 1 | 2 | 11/12/13 <
1001 | 1 | 1 | 09/12/13
1001 | 0 | 1 | 01/01/13
1002 | 1 | 1 | 11/11/13 <
1003 | 2 | 0 | 12/12/13 <
1003 | 1 | 1 | 02/02/13
How do I end up with a result set containing just the latest issues (indicated above with '<')?
I've tried DISTINCT, MAX, etc. and believe it is some kind of JOIN structure I may need?
Thanks a lot for any help.