Posts Tagged by CTE
How to refer to previous row in SQL 2005
| September 22, 2010 | Posted by Matt under SQL |
In this post I will describe simple mechanism allowing to refer back to previous row in SQL Server 2005/2008 database table. For the purpose of this article let’s create a table dbo.AgentLog: create table dbo.AgentLog ( AgentID int ,LogInTime datetime ,LogOutTime datetime ) go insert dbo.AgentLog select 1, ’2010-09-08 09:40:00.000′, ’2010-09-08 10:14:00.000′ union all select…
I am IT professional with over 10 years of experience in computer programming and web development, specializing in Microsoft technologies.



Recent Comments