Apr 25, 2005 #1 Trudye Programmer Sep 4, 2001 932 US How do I write an SQL statement to get the most recent date? Is Max date an option? Thanx much, Trudye
How do I write an SQL statement to get the most recent date? Is Max date an option? Thanx much, Trudye
Apr 25, 2005 1 #2 lespaul Programmer Feb 4, 2002 7,083 US select Max(DateField) from Tablename will give you the most recent date entered in this field. If you need additional fields, you must also include them in a GROUP BY Statement: SELECT USERNAME, MAX(DateField) FROM TableName GROUP BY USERNAME Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual Upvote 0 Downvote
select Max(DateField) from Tablename will give you the most recent date entered in this field. If you need additional fields, you must also include them in a GROUP BY Statement: SELECT USERNAME, MAX(DateField) FROM TableName GROUP BY USERNAME Leslie Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual
Apr 25, 2005 #3 fredericofonseca IS-IT--Management Jun 2, 2003 3,324 PT And what have you tried to far? Some code please and an explanation of why it didn't return the values you expected, along with same sample data. Regards Frederico Fonseca SysSoft Integrated Ltd http://www.syssoft-int.com Upvote 0 Downvote
And what have you tried to far? Some code please and an explanation of why it didn't return the values you expected, along with same sample data. Regards Frederico Fonseca SysSoft Integrated Ltd http://www.syssoft-int.com
Apr 25, 2005 Thread starter #4 Trudye Programmer Sep 4, 2001 932 US Thanx Paul. I had no idea what to use so I decided to ask. I couldn't find anytning on it in the book that I have. Thanx again, Trudye Upvote 0 Downvote
Thanx Paul. I had no idea what to use so I decided to ask. I couldn't find anytning on it in the book that I have. Thanx again, Trudye