Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Aged Yak Warrior
Flowing Fount of Yak Knowledge
t.c1,t.c2,t.c1-(t2.n-1) AS c3
SELECT MAX(c1) AS n FROM Tbl t2
WHERE t2.c1 <= t.c1 AND t2.c2 = 1