Distinct Row

Last Post 11 Feb 2009 12:39 PM by kjmcsd. 1 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
kjmcsd
New Member
New Member

--
10 Feb 2009 11:32 AM
AID BID IR CID USER

220 12980 1 23870 FARMER
220 13152 1 24152 JOHNSON
220 12988 1 23883 JONES
220 12988 2 23884 JONES
220 13227 1 24283 ZAXBY
220 13227 2 24286 ZAXBY


The table is above. What I want to do is get distinct rows for each user. For Jones and Zaxby I want the record with the highest CID.

Can someone help me with the T-SQL to do this?
Thanks!!!
kjmcsd
New Member
New Member

--
11 Feb 2009 12:39 PM
Thanks! You got me 90% of the way.


Acceptable Use Policy
---