Hi there I have the following dataset,
ref to_date ref1
35447 2006-03-24 00:00:00.000 -1
54001 2006-03-24 00:00:00.000 -6
54001 2007-03-24 00:00:00.000 -8
54201 2006-12-31 00:00:00.000 -990
From this record set I want 3 rows, first, third and fourth. I don't need the second due to the refernce number being the same as the third, but the third line the date is greater than the second.
Does anyone know the SQL for this, I need to keep all three columns.
Cheers
Bob
ref to_date ref1
35447 2006-03-24 00:00:00.000 -1
54001 2006-03-24 00:00:00.000 -6
54001 2007-03-24 00:00:00.000 -8
54201 2006-12-31 00:00:00.000 -990
From this record set I want 3 rows, first, third and fourth. I don't need the second due to the refernce number being the same as the third, but the third line the date is greater than the second.
Does anyone know the SQL for this, I need to keep all three columns.
Cheers
Bob