3 Replies Latest reply: Jul 21, 2011 12:47 PM by Robson Silva RSS

    Cumulative Sum in Load

    Robson Silva

      I need to do a cumulative sum in the resident table as follows

       

      tab1

      a, b, c, d

      a, 201101, 1, 0

      a, 201101, 1, 1

      a, 201102, 1, 1

      b, 201101, 1, 0

      b, 201102, 1, 1

      c, 201101, 1, 0

      c, 201102, 1, 0

       

       

      result

      a, b, c, d, e, f

      a, 201101, 1, 0, 1, 0

      a, 201101, 1, 1, 2, 1

      a, 201102, 1, 1, 3, 2

      b, 201101, 1, 0, 1, 0

      b, 201102, 1, 1, 2, 1

      c, 201101, 1, 0, 1, 0

      c, 201102, 1, 0, 2, 0