Query Max Value

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

Guest

I have a field which represents various dates meter readings were taken for a
customer. I need my query to pull only the most reacent reading. I can't
seem to figure out how to write the query to pull only the most recent date.
Please help!

--
Regards,

Bryan Brassell
Cypresswood Financial, LLC
Financial, accounting and process consulting
281-897-9141
 
SELECT TOP 1 tblTest.Reading, tblTest.DateRead
FROM tblTest
WHERE (((tblTest.CustomerID)=[Customer ID?]))
ORDER BY tblTest.DateRead DESC;
 
I don't know sql well - how can I translate that into an expression in the
query builder? You were correct in surmising the customer number is the key
between the fields - the next field would be the "Service_To" field from wich
I need the most recent date only for each customer. Thanks...
--
Regards,

Bryan Brassell
Padgett Business Services
281-897-9141


Brendan Reynolds said:
SELECT TOP 1 tblTest.Reading, tblTest.DateRead
FROM tblTest
WHERE (((tblTest.CustomerID)=[Customer ID?]))
ORDER BY tblTest.DateRead DESC;

--
Brendan Reynolds

Bryan Brassell said:
I have a field which represents various dates meter readings were taken for
a
customer. I need my query to pull only the most reacent reading. I can't
seem to figure out how to write the query to pull only the most recent
date.
Please help!

--
Regards,

Bryan Brassell
Cypresswood Financial, LLC
Financial, accounting and process consulting
281-897-9141
 

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

Similar Threads

Query maximum values 2
Select Criterion - wildcard 1
excluding records 2
First 200 Query 6
Form/SubForm 2
Problem with Aggregate query 1
Select Max and Next to Max Dates 2
Finding max value 3

Back
Top