I am using sql server 2000
I have a table like below :
lr_no seq len
8402606 003 48
8410184 002 50
8410184 003 30
8411592 002 33
8415732 005 12
8416530 002 24
8415732 004 27
where 8410184 & 841573 are duplicated .
i want to filter the table such that if in case of duplicate lr_no’s then row is selected depending on max(len) .
final output should be
lr_no seq len
8402606 003 48
8410184 002 50
8411592 002 33
8416530 002 24
8415732 004 27
can anyone help ?
1 Answer