Re: query assistance -return most recent date

From: Hugo Kornelis (hugo_at_pe_NO_rFact.in_SPAM_fo)
Date: 02/10/05


Date: Thu, 10 Feb 2005 18:31:53 +0100

On Thu, 10 Feb 2005 09:17:01 -0800, Rich_A2B wrote:

>I have a table that has two fields, pkg_num, which is a number, and
>del_date_time, which is a date-time. The table can contain duplicate pkg_num
>values, as long as the del_date_time values are different for any given
>number. I need a query that will return the most recent del_date_time for
>each pkg_num. Any ideas?

Hi Rich_A2B,

Probably

SELECT pkg_num, MAX(del_date_time)
FROM MyTable
GROUP BY pkg_num

Best, Hugo

-- 
(Remove _NO_ and _SPAM_ to get my e-mail address)