× 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.



   From:     jromeh@xxxxxxx
   Subject:    Re: [WDSCI-L] SQL getting record with last date/Time
   Date:   August 31, 2006 2:44:24 PM CDT
   To:       wdsci-l@xxxxxxxxxxxx

Michael--

here's one way...

select a.logdate, max(a.logtime)
from logfile a
group by a.logdate
where a.logdate = (select max(b.logdate) from logfile b)

thx & hth,

--Jerome


On Aug 31, 2006, at 2:34 PM, Smith, Mike wrote:


 L      ADMIN_BW    HARLESSD    20060830   155855
 U      ADMIN_BW    CHISOMT     20060831   143021
 L      ADMIN_BW    CHISOMT     20060831   143250

I need to do an sql select statement that will retrieve the highest date
in a file, but also the highest time for that particular date.

Originally I was just getting the latest date with  a Select
max(logDate).

I then tried knowing it wouldn't work  Select max(logdate),
max(logTime).

In the above records I would want  20060831- 143250
How would I accomplish this?


Michael Smith
iSeries.mySeries.

--
This is the Websphere Development Studio Client for iSeries (WDSCI- L) mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.