MS access - Most recent Date
I need the syntax in SQL (or Criteria) to find the most recent date in a table. table contains IssueID, ProgressLog, and ProgressUpdateDate. I am trying to get most recent ProgressUpdateDate inthe table. IssueId can have more than one progressLog. I need to get most recent progressupdatedate and progresslog in the table.
thanks in advance
Pretty Gal
Re: MS access - Most recent Date
I'm not entirely sure what you want, but this should at least be a good start:
To get the highest date value:
Code:
SELECT Max(ProgressUpdateDate)
FROM tablename
To get this, and the ProgressLog field:
Code:
SELECT ProgressUpdateDate, ProgressLog
FROM tablename
WHERE ProgressUpdateDate = (SELECT Max(ProgressUpdateDate) FROM tablename)
Re: MS access - Most recent Date
SELECT Q.IssueId, Q.ProgressLog, Q.ProgressUPdateDate
FROM tblProgressLog AS Q
WHERE ProgressUPdateDate= (SELECT Max(T.ProgressUPdateDate)
FROM tblProgressLog As T
WHERE T.IssueId=Q.IssueId);
how can i include all the null fields? The syndex above gets only the records have a ProgressUpdateDate. Some of the records i dont have date.
:(
Thanks in Advance
Re: MS access - Most recent Date
For that you can just add an Or to the Where clause, eg:
Code:
SELECT Q.IssueId, Q.ProgressLog, Q.ProgressUPdateDate
FROM tblProgressLog AS Q
WHERE ProgressUPdateDate= (SELECT Max(T.ProgressUPdateDate)
FROM tblProgressLog As T
WHERE T.IssueId=Q.IssueId)
OR ProgressUPdateDate Is Null;
Re: MS access - Most recent Date
thank you very much
i really like this forum :)):)
Pretty gal