I have a result ie.,
RecID Name ID1 ID2 ID3
1 OP014B_80460_013 1092 1743 1500
2 OP014B_80460_013 1743 1092 1500
3 OP014B_80461_001 1092 1774 1500
4 OP014B_80461_001 1774 1092 1500
From this i need to get result..
RecID Name ID1 ID2 ID3
2 OP014B_80460_013 1743 1092 1500
4 OP014B_80461_001 1774 1092 1500
Since 2 & 4 is the max intrecid
My query is
SELECT distinct(vchLotname) as Lot1,intAllottedTo, intReAllottedTo, intReAllottedBy FROM tbReAllottedLots WHERE
vchbatch='bt0809-11b' AND intPurposeID=1 ORDER BY vchLotName
How do i get the distinct from this
Thanks in Advance Happy new year...
Mani - Mani
|