G
Greg McLandsborough
I have a table [Document Revision] which has a Foriegn key to [Document
Register]. I am trying to sort for the latest Revision_ID by date as noted
below works fine.
SELECT [Document Revision].Document_ID, Max([Document
Revision].Revision_Date) AS MaxOfRevision_Date
FROM [Document Register] INNER JOIN [Document Revision] ON [Document
Register].Document_ID = [Document Revision].Document_ID
GROUP BY [Document Revision].Document_ID;
However if I add [Document Revision].Revision_ID to the statement, the query
returns all revision for a particular Document. How Do I return the last
Revision_ID by latest date.
Appreciate any help
Regards
Greg
Register]. I am trying to sort for the latest Revision_ID by date as noted
below works fine.
SELECT [Document Revision].Document_ID, Max([Document
Revision].Revision_Date) AS MaxOfRevision_Date
FROM [Document Register] INNER JOIN [Document Revision] ON [Document
Register].Document_ID = [Document Revision].Document_ID
GROUP BY [Document Revision].Document_ID;
However if I add [Document Revision].Revision_ID to the statement, the query
returns all revision for a particular Document. How Do I return the last
Revision_ID by latest date.
Appreciate any help
Regards
Greg