This SQL (Report) can be used to pull the Balance Sheet for any period in an easy-to-export format.

Note: The Retained Earnings balance is not pulled into this report. The retained earnings amount calculation is shown in a separate SQL below, but is not included as a row in the report

RowIDFormattedNameBalance
1AssetsNULL
2Undeposited FundsNULL
1Undeposited Cash & Checks
1Undeposited AmEx800.00
1Undeposited Visa_MC1024.00
1Inventory AssetsNULL

None. This is a selection query and no data is modified in the running of it.

code format"sql"

DECLARE @GLDate datetime;

DECLARE @ShowZero bit;

DECLARE @ShowInactive bit;

–SET @GLDate ;

–SET @ShowZero ;

–SET @ShowInActive ;

SET @GLDate '12/31/2009 23:59';

SET @ShowZero 1;

SET @ShowInactive 0;

DECLARE @Spacing int;

SET @Spacing 4;

SELECT *

FROM

(

  SELECT

    ROW_NUMBER() OVER(ORDER BY FormattedPath) as Row,

    GLTree.FormattedName,

    coalesce((select sum(Amount) from GL where GL.GLAccountID  GLTree.NodeID and EntryDateTime


You could leave a comment if you were logged in.