A
amg0657
I ran a Select query using the GROUP BY clause. My query selects only two
fields from one table, one field is [Name] and the second field is [Date].
For example, in the table, [Name] is populated with JohnSmith and there can
be two dates for JohnSmith. The dates are 2/26/2007 and 5/15/2008. For
another name, DaveJones, in the same table, the two dates could be 8/6/2007
and 7/30/2008. If I group by Name and select LastOf[Date], I would expect to
see the following:
Name Date
JohnSmith 5/15/2008
DaveJones 7/30/2008
since 5/15/2008 is after 2/26/2007 (for JohnSmith) and since 7/30/2008 is
after 8/6/2007 (for DaveJones). For some reason, JohnSmith returns 2/26/2007
but DaveJones returns 7/30/2008. Why would this occur? Please advise.
Thanks.
fields from one table, one field is [Name] and the second field is [Date].
For example, in the table, [Name] is populated with JohnSmith and there can
be two dates for JohnSmith. The dates are 2/26/2007 and 5/15/2008. For
another name, DaveJones, in the same table, the two dates could be 8/6/2007
and 7/30/2008. If I group by Name and select LastOf[Date], I would expect to
see the following:
Name Date
JohnSmith 5/15/2008
DaveJones 7/30/2008
since 5/15/2008 is after 2/26/2007 (for JohnSmith) and since 7/30/2008 is
after 8/6/2007 (for DaveJones). For some reason, JohnSmith returns 2/26/2007
but DaveJones returns 7/30/2008. Why would this occur? Please advise.
Thanks.