Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

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.

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 […]

Comments

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

Loading comments...