Query Max Value

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
 
B

Brendan Reynolds

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

Guest

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


Top