Joined: 20 Feb 2009
Location: United States
Online Status: Offline
Posts: 66
Topic: How do I get the record with the most current date Posted: 09 Nov 2012 at 1:10am
How do I get the record with the most current date for each person's ID?
I am doing this in sql.
right now I have
Select ID, testDate, Status1
from myTable a
where testDate = (select max(testDate) from myTable b
where a.ID = b.ID)
but this gives me the previous day date(when i ran today, it gave me yesterday's date)but in the databse the latest date is 11/1/2012
what am I missing?
TIA
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum