I am working on a sql statement to get the record that has the highest date/time for a meter
I'm close, but when I try to include my reading data, I don't get the results I want.
So my data looks something like this filename "ReadingBatch)
This is my current sql statement which appears to pick up the correct data, just not the HSTREAD field
SELECT HSTBATCH, max(concat(concat(hstrdate, ' '),hstrtime)) as HT,
HSTMTR# FROM readingbatch WHERE hstbatch
= 'IMR07' GROUP BY hstbatch, hstmtr#
ORDER BY hstmtr#
If I add the field HSTREAD I get too many records.
NOTICE: This message, including any attachment, is intended as a confidential and privileged communication. If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this message.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.