SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

SQL SERVER 2012 - How to get a value from previous result row effectively

Reblogged from SQL Server Portal: I came across this query many times and most often we need the previous row result in the current row for comparison purposes.  Fortunately, we do have a solution for this problem using self join. But I will share another efficient solution with you using LAG (an analytic function shipped with […]

Coffee and SQL

I’m Carla Abanes, working as a full time Senior SQL Database Administrator here in Singapore for an established financial trading firm.


Leave a comment on the original post [coffeeandsql.com, opens in a new window]

Loading comments...