View Single Post
  #9 (permalink)  
Old 01-21-2009, 10:39 AM
MattP MattP is offline
VB.NET Forum Idol
.NET Framework: .NET 2.0 (VS 2005)
 
Join Date: Feb 2008
Location: USA
Posts: 869
Reputation: 499
MattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond reputeMattP has a reputation beyond repute
Default

I would love to be able to use LAG and LEAD.

The 2nd solution works better for the original poster. I left the 1st post in to show how to get a running count by group and how I go about tackling a complex solution.

Feedback Thread Let Microsoft know you want LAG/LEAD in future releases of SQL Server.
Reply With Quote