Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-06-07 : 07:18:43
|
Lubomir writes "If you write following SELECT in ORACLE:select l.*, lag(week,1) as prev_weekfrom MI_Risk..lu_row lYou will obtain this result:NAME WEEK PREV_WEEK-------------------------------------------------mike 1 NULLmike 2 1mike 3 2mike 4 3How to write similar select in SQL Server environment, please?ThanksLubomir" |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-07 : 07:50:43
|
Post your Sample data alsoMadhivananFailing to plan is Planning to fail |
|
|
raclede
Posting Yak Master
180 Posts |
Posted - 2005-06-07 : 21:15:58
|
what does lag mean?"If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside. "raclede |
|
|
|
|
|