Chuck,

Can you try the this?

Select ID, Type, max(yourDate)
>From yourTable
Group By Type, ID

The order of the display will be different if you
change the order of the statement, "Group By ID,
Type".

I tested the query using Microsoft SQL Server 7.0.

Ping
12/6/01 at 3:10pm


--- "Tomasi, Chuck" <[EMAIL PROTECTED]> wrote:
> I've got table to track my backup tapes.  Each time
> a tape is used, I log a
> few things about it.  I would like to construct a
> select statement to show
> me the last entry for tape has been.
> 
> desc tape;
> Name          Type
> =============================
> ID            number
> Location      number
> Updated       date
> 
> Input data may look something like:
> 
> 1     12      10-Oct-01
> 2     14      10-Oct-01
> 1     12      12-Oct-01
> 4     10      12-Oct-01
> 2     14      14-Oct-01
> 
> In this case, I would only like the tree latest
> entries:
> 
> 1     12      12-Oct-01
> 4     10      12-Oct-01
> 2     14      14-Oct-01
> 
> --Chuck


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

Reply via email to