Addition of Rows in Datastage
Posted: Fri Jul 11, 2008 3:07 pm
Hi,
I would like to add records in datastage in such a way that I obtain the cumulative sum in the output column. So for example, if the
Input dataset
YEAR AMOUNT
2007 10
2008 20
2009 5
2010 15
2011 30
Output dataset should look like this:(CUMSUM is the output column)
YEAR AMOUNT CUMSUM
2007 10 10
2008 20 30
2009 5 35
2010 15 50
2011 30 80
If anyone can give me some suggestion as to how to go about achieving this, it would be great.
Thanks,
dscon9128
I would like to add records in datastage in such a way that I obtain the cumulative sum in the output column. So for example, if the
Input dataset
YEAR AMOUNT
2007 10
2008 20
2009 5
2010 15
2011 30
Output dataset should look like this:(CUMSUM is the output column)
YEAR AMOUNT CUMSUM
2007 10 10
2008 20 30
2009 5 35
2010 15 50
2011 30 80
If anyone can give me some suggestion as to how to go about achieving this, it would be great.
Thanks,
dscon9128