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 |
Tim
Starting Member
392 Posts |
Posted - 2001-08-06 : 22:06:00
|
I have records which have the day of the year that a certain event (A,B,C...) ocurred on.I want a query that gives the number of days since the last occurrence of the same event.eg:records areA 156 B 144A 186B 140A 190A 166B 150I want query that gives:A 156 NULLA 166 10A 186 20A 190 4B 140 NULLB 144 4B 150 6Maybe I need a cursor? *trolls for nr's response* |
|
|
|
|