Critical issue need suggestion

  • i have a situation like the below

    'AR Balance is recorded once per month. The AR Balance is calculated as a running total of invoices (from the MX_BI_TOTALS file) minus payments (from the MX_BI_PAYMENTS file) by customer. Our data starts at the beginning of 2006. The balance for January 2006 is the sum of the invoices for January 2006 minus the sum of the payment for January 2006. The balance for February 2006 is the sum of invoices for January and February 2006 minus the sum of payments for January and February 2006. The balance for March is the sum of invoices for January, February and March minus the sum of payments for January, February and March, and so on."

    Can any one help me out in this what to be done and how to go through.

    how the data from previous month will be added to the next month and so on.

  • Would you mind posting some data so we can help you accurately? Please see the following article for how to get really good answers quickly... seriously... read the article... your post went all day with no answer for a reason...

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply