467,915 Members | 1,431 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

Get Distinct rows from multiple columns

Manikgisl
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
Nov 19 '08 #1
  • viewed: 2124
Share:
1 Reply
ck9663
Expert 2GB
When you say

Since 2 & 4 is the max intrecid
Do you mean max ID?

-- CK
Nov 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Florian | last post: by
6 posts views Thread by zaphod | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.