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 |
|
voyager838
Yak Posting Veteran
90 Posts |
Posted - 2009-05-22 : 04:23:39
|
| Hi I want to do an "report" from an tableLets assume that i using this tableDateTime, Field'2008-01-01 00:00:00',NULL'2008-01-01 00:03:00','3.4'2008-01-01 00:09:00','5.4'2008-01-01 00:12:00',NULL'2008-01-01 00:15:00',NULL'2008-01-01 00:16:00','3.4'2008-01-01 00:17:00','5.4'2008-01-01 00:20:00',NULLThen i want to perform a result/table (report) like thisStartsFrom ; HowLongInMinutes ; Value2008-01-01 00:00:00 3 , NULL2008-01-01 00:03:00 9 , NOT NULL2008-01-01 00:12:00 4 , NULL2008-01-01 00:16:00 4 , NOT NULL2008-01-01 00:20:00 , NULLIts kind of an resume of how long every "changes" of valueis keep going.RegardsVoy |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-22 : 04:30:02
|
| http://www.sqlteam.com/article/detecting-runs-or-streaks-in-your-data |
 |
|
|
voyager838
Yak Posting Veteran
90 Posts |
Posted - 2009-05-22 : 04:37:55
|
| Thanks for the link Visakh16!That's really comes in handy. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-22 : 04:47:45
|
| welcome |
 |
|
|
|
|
|
|
|