133 reputation
3
bio website
location Houston, TX
age 27
visits member for 2 years, 7 months
seen Apr 2 '13 at 19:06

Dec
27
comment Find the first gap in an aggregation of integers in SQL Server
Well, the PK on the table is GroupID, Rank, so within the same group there should never be ties for the value of rank. So I'm just sticking with row number. Though, I thought when he mentioned "equal values" he was referring to the case of ties and that "joint 2nd" meant something else.
Dec
27
comment Find the first gap in an aggregation of integers in SQL Server
Fantastic answer, very informative! The 3 conditions you mentioned shouldn't apply, so I'm okay there. I'm fairly sure I don't want RANK or DENSE_RANK; I understand what you mean by equal values, but what do you mean exactly by "joint 2nd"?