Duey,
To keep it from getting too complicated, I would try something like

CREATE VIEW LastContacts (CntID, LastDate) +
  AS SELECT CntID, MAX (CntDte) FROM tablename GROUP BY CntID)

Then any

SELECT CntID FROM LastContacts

gives you your list.

Bill

On Wed, Oct 8, 2008 at 10:00 AM, Heffelfinger, Duane <[EMAIL PROTECTED]>wrote:

>  I suspect this is a very easy SQL statement that I just can't think of
> today.  I have a contact table with the following columns.
>
>   CntId INTEGER AUTONUM
>
>   CntNme TEXT 10
>
>  CntDte DATE
>
>
>
> And the following rows:
>
>   1,Dave,01/25/2008
>
>   2,Jack,05/09/1981
>
>   3,Jack,10/09/1985
>
>   4,Dave,01/01/1980
>
>   5,Sam,06/17/2004
>
>
>
> I want an sql statement that produces the contact id for the most current
> contact of each individual.  The result should be:
>
> CntId
>
> +++++
>
> 1
>
> 3
>
> 5
>
>
>
> Thanks for any ideas.
>
>
>
> Duey
>
>
>
> P.S.  Hope we're playing golf after the conference on Monday?
>
>
>
>
>
>
>

Reply via email to