2 Replies Latest reply: Feb 2, 2018 3:13 AM by Jarkko Pelli RSS

    Load script cumulative problem

    Jarkko Pelli

      Hi ,

       

      Im struggling with a cumulative load script issue I cant figure out :/

       

      What I want to archieve, is to get a cumulative sum from "Transaktio_capital_called" and "Transaktio_capital_distributed" columns. The load script should calculate the cumulative sum by company. "Transaktio_payment_date" defines the date.

       

       

      How can this be archieved?

       

      LOAD "Transaktio_payment_date" as pvm,

          "Transaktio_Year",

          "Transaktio_month",

          "Transaktio_investor" as Investor,

          "Transaktio_investee"&'.'&"Transaktio_investor" as Company.investor,

          "Fund_investor",

          "Transaktio_investee" as Company,

          "Transaktio_fund_direct",

          "Transaktio_capital_called",

      "Transaktio_capital_distributed";

       

       

       

      SQL SELECT "Transaktio_payment_date",

          "Transaktio_Year",

          "Fund_investor",

          "Transaktio_month",

          "Transaktio_investor",

          "Transaktio_investee",

          "Transaktio_fund_direct",

          "Transaktio_additional _information",

          "Transaktio_capital_called",

          "Transaktio_distributed",

          "Transaktio_capital_distributed",

          "Transaktio_profit",

          "Transaktio_divident",

          "Transaktio_interest",

          "Transaktio_valuation",

          "Transaktio_other_income",

          "Transaktio_operation",

          "Transaktio_type",

          "Transaktio_Shares",

          "Transaktio_Program",

          "Transaktio_Instrument",

          "Transaktio_Instutype"

      FROM "DW".dbo."Kaikki.transaktio"