Using 'Max' in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
When I use 'Max' in a query in a date field. I do not get the correct
records for the fields associated with the date field. I do however get the
correct 'Max' date.
Why is this happening?
Example field names:
PayeeDate
Activity
HoursSpent
AmountPaid
 
DAngelia said:
When I use 'Max' in a query in a date field. I do not get the correct
records for the fields associated with the date field. I do however get the
correct 'Max' date.
Why is this happening?
Example field names:
PayeeDate
Activity
HoursSpent
AmountPaid


Hard to tell without seeing the query.

An aggregate function is normally used in a Totals type
(Group By) query. The other fields in the query must be
specified as Group By, which means they will all be the
same. So, how could they be wrong?

Maybe(?) you want to sue a SELECT TOP 1 type query instead
of a Totals query??
 
DAngelia said:
Hello,
When I use 'Max' in a query in a date field. I do not get the correct
records for the fields associated with the date field. I do however get the
correct 'Max' date.
Why is this happening?
Example field names:
PayeeDate
Activity
HoursSpent
AmountPaid

D'Angelia,

You wrote: "When I use 'Max' in a query in a date field. I do not get
the correct records for the fields associated with the date field."

And: "I do however get the correct 'Max' date."

Please forgive me, but I am not sure how that goes together.

"I do not get the correct records" and "I do however get the correct
'Max' date" seem to be opposite statements.


Sincerely,

Chris O.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top