Oliver2003
Technical User
I have been using the sql below to select the DocNo field from table A and the maximum RevNo for this DocNo from table B.
This sql was posted by Golom in a previous thread701-626707
Select A.DocNo, MAX(B.RevNo) As [Max Revision]
From Docs As A INNER JOIN Revisions As B ON A.DocNo = B.DocNo
Group By A.DocN0
the sql above works great if I only want the "RevNo" form tblRevisions (table B).
Is it possible to get information from B in the row where the max revision is found e.g.
A.DocNo MAX(B.RevNo) B.Changes
so the query would display A.DocNo the maximum RevNo for this document(as posted above) and the B.Changes relating to this max RevNo
I tried just adding B.Changes to the sql above, but it displays a record for each B.Changes and not just the one that has the max B.RevNo
Thanks For Your Help
thread701-626707
This sql was posted by Golom in a previous thread701-626707
Select A.DocNo, MAX(B.RevNo) As [Max Revision]
From Docs As A INNER JOIN Revisions As B ON A.DocNo = B.DocNo
Group By A.DocN0
the sql above works great if I only want the "RevNo" form tblRevisions (table B).
Is it possible to get information from B in the row where the max revision is found e.g.
A.DocNo MAX(B.RevNo) B.Changes
so the query would display A.DocNo the maximum RevNo for this document(as posted above) and the B.Changes relating to this max RevNo
I tried just adding B.Changes to the sql above, but it displays a record for each B.Changes and not just the one that has the max B.RevNo
Thanks For Your Help
thread701-626707