× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You changed both the SELECT and the GROUP BY.



-----Original Message-----
From: Smith, Mike [mailto:Mike_Smith@xxxxxxxxxxxxxxxx]
Sent: Monday, March 30, 2020 9:50 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: [EXTERNAL] RE: sql troubles

Thanks for the reply
That doesn't seem to help much.
I still get both records for 20181212

SELECT prem, reading, rdate, max(digits(rdate)
concat(rtime)) FROM hstread00 WHERE rdate between
20181212 and 20190101 and batch <> 'OORTE' and prem = '100' GROUP BY prem, reading, rdate order by prem, rdate
PREM READING DATE MAX
100 14,936.00 20,181,212 20181212100000
100 14,939.00 20,181,212 20181212110020

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin Taylor
Sent: Monday, March 30, 2020 10:32 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] RE: sql troubles

Would this work:
select PREM, max( digits(RDATE) concat digits(RTIME) )
from hstread00
where rdate between 20181212 and 20190101 and batch <> 'ORTE' and prem = '100'
group by PREM


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.