Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rolling Change Field

Status
Not open for further replies.

dky1e

Programmer
May 4, 2002
293
US
Hi,

Here's the data in the table
[tt]id value
5 546
6 566
7 566
8 587[/tt]

I want to add a "delta" column that will show the change between the current data and data above, so it would show:
[tt]id value delta
5 546
6 566 20
7 566 0
8 587 21[/tt]

Is it possible in RS or should it be implemented in the sql query?
 
I don't think there is any "Previous" function in RS like there is in say Business Objects - there are Rolling Sums / Counts but you would still need a way of referring to the previous row - easiest to do it in SQL I would've thought - bring it into the report as a field in its own right

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top