View Single Post

   
  #2 (permalink)  
Old 02-29-2008, 07:07 PM
Tom Moreau
 
Posts: n/a
Default Re: Sum Accumulating Data

Without a primary key, little can be done. The data aren't stored in any
particular order, so as far as SQL Server is concerned, the list of values
you have given us is no different from

0.35
0.44
0.53
0.60
0.68
0.78
0.85
0.93
239.13
239.21
239.30
239.38
239.46
239.55


--
Tom

----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
..
<sucaba.r@gmail.com> wrote in message
news:1145023509.190804.201060@g10g2000cwb.googlegr oups.com...
I've got a table that contains a column of accumulating uptime data
that looks similar to this:

239.13
239.21
239.30
239.38
239.46
239.55
0.35
0.44
0.53
0.60
0.68
0.78
0.85
0.93

I need to SUM the data up the point where the data gets reset (the next
row is less than the preceeding row). Then I start the SUM again until
data gets reset.

Thanks in advance for help!

Reply With Quote