Home Forums SQL Server 2008 T-SQL (SS2K8) Update row Beginning Balance with Prev Row Trial_Balance RE: Update row Beginning Balance with Prev Row Trial_Balance

  • jameslauf (8/1/2014)


    Fixed my CODE and attaching Excel sheet to show desired output. see column N, O, P for results.

    Looking at the expected results prompts few questions:

    😎

    1. Is this dataset for a single account?

    2. Why would an earlier record be assigned the beginning balance from a later record, ie. row 10, 18?

    3. Can you explain why a Accounts Payable account receives the beginning balance of an cash account from the same month? (row 19)

    To obtain the results in the Expected results spreadsheet, simply do a self join on Trial_Balance_ID = Trial_Balance_ID - 1. Must say it seems illogical to me though.