K
KCMCS
I have a table that I'm querying to extract out the 'max' record. The problem
is, there are some other variables in the table that I need to pull back with
it and when I include them, it messes with the results and gives me more than
one record.
Basically it is a table with the following fields:
FIELD NAME, DATA TYPE
a, number (this is the unique record id)
b, number (this is the field I need the max record for)
c, number (other record data)
d, datetime (other record data)
e, number (other record data)
f, varchar (other record data)
The value in field a could be in multiple records all pertaining to the same
'event'. What I need to get to is to pull out the single record pertaining to
the 'event' and based on it having the maximum number in field 'b', but I
also need to include the other fields in my query results. The problem being
that the other fields have varying data, so pulling back the records based
only on the max value in field 'b' returns multiple results because it also
looks at the other fields.
I hope this makes sense. Any help would be appreciated.
is, there are some other variables in the table that I need to pull back with
it and when I include them, it messes with the results and gives me more than
one record.
Basically it is a table with the following fields:
FIELD NAME, DATA TYPE
a, number (this is the unique record id)
b, number (this is the field I need the max record for)
c, number (other record data)
d, datetime (other record data)
e, number (other record data)
f, varchar (other record data)
The value in field a could be in multiple records all pertaining to the same
'event'. What I need to get to is to pull out the single record pertaining to
the 'event' and based on it having the maximum number in field 'b', but I
also need to include the other fields in my query results. The problem being
that the other fields have varying data, so pulling back the records based
only on the max value in field 'b' returns multiple results because it also
looks at the other fields.
I hope this makes sense. Any help would be appreciated.