I have a result ie.,
RecID Name ID1 ID2 ID3
1 OP014B_80460_01 3 1092 1743 1500
2 OP014B_80460_01 3 1743 1092 1500
3 OP014B_80461_00 1 1092 1774 1500
4 OP014B_80461_00 1 1774 1092 1500
From this i need to get result..
RecID Name ID1 ID2 ID3
2 OP014B_80460_01 3 1743 1092 1500
4 OP014B_80461_00 1 1774 1092 1500
Since 2 & 4 is the max intrecid
My query is
SELECT distinct(vchLot name) as Lot1,intAllotte dTo, intReAllottedTo , intReAllottedBy FROM tbReAllottedLot s WHERE
vchbatch='bt080 9-11b' AND intPurposeID=1 ORDER BY vchLotName
How do i get the distinct from this
Thanks in Advance Happy new year...
Mani - Mani
RecID Name ID1 ID2 ID3
1 OP014B_80460_01 3 1092 1743 1500
2 OP014B_80460_01 3 1743 1092 1500
3 OP014B_80461_00 1 1092 1774 1500
4 OP014B_80461_00 1 1774 1092 1500
From this i need to get result..
RecID Name ID1 ID2 ID3
2 OP014B_80460_01 3 1743 1092 1500
4 OP014B_80461_00 1 1774 1092 1500
Since 2 & 4 is the max intrecid
My query is
SELECT distinct(vchLot name) as Lot1,intAllotte dTo, intReAllottedTo , intReAllottedBy FROM tbReAllottedLot s WHERE
vchbatch='bt080 9-11b' AND intPurposeID=1 ORDER BY vchLotName
How do i get the distinct from this
Thanks in Advance Happy new year...
Mani - Mani
Comment