SQL question

WSalaz01

New member
Local time
Today, 06:24
Joined
Jan 17, 2007
Messages
6
DATE ACCT CLASS
7/28/07 5:31AM 1233 A
7/28/07 5:32AM 1233 B


quick question…if I am trying to get “B” on my query results how can I write my SQL statement? I am trying to query from a history table and I am looking for the most recent CLASSES (or current value).

thank you in advance...William
 
use a total query and set the total type for the field Class to last or Max and group by for date however you will have problems with your date as the time is included. So you will require to format the date to exclude the time.
 
The best method to get rid of time if it gets in the way is with

DateValue(yourdatefield)

or if you wanted only the time portion, you would use

TimeValue(yourdatefield)
 

Users who are viewing this thread

Back
Top Bottom