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



I'm not sure of the exact syntax, but I'd do something like:

SELECT MAX(logdate*1000000 + logtime) as maxval, DIV(maxval,1000000) as 
logdate, MOD(maxval, 1000000) as logtime, where MOD finds the remainder 
and DIV is integer division.

In ASC's SEQUEL, WDATA make the field not output when printing or emailing 
the results of the query.   Maybe there is a pure SQL version of this?  On 
the other hand, if you are processing the data in some program you could 
just ignore the first column in the result.

Hope this helps,
Adam


wdsci-l-bounces@xxxxxxxxxxxx wrote on 31/08/2006 03:34:01 PM:

 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.

#####################################################################################
Attention:
The above message and/or attachment(s) is private and confidential and is 
intended 
only for the people for which it is addressed. If you are not named in the 
address 
fields, ignore the contents and delete all the material. Thank you. Have a nice 
day.

For more information on email virus scanning, security and content
management, please contact administrator@xxxxxxxxxxxx
#####################################################################################

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.