SQL2k - Selecting from duplicate records - TechRepublic
General discussion
April 18, 2003 at 03:20 AM
timp999

SQL2k – Selecting from duplicate records

by timp999 . Updated 23 years, 2 months ago

Hi,

I’ve got a pickle here, that I don’t know how to solve. In a SQL2000 database, I need to build a query on one table that contains multiple records for the same key.

here’s the deal: I have multiples of the same ID, with different timestamps. for a key of ID,Timestamp I need to select the ones that have the highest time value. I’ve been trying to use the max function but I’m by no means a SQL expert and I’m stuck.

Can anybody offer some guidance? I know this should be a simple querybut it’s killing me.

Thanks!
Tim

This discussion is locked

All Comments