Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
control_sql_-_find_off-of-balance_sheet_issues [2019/04/23 09:43]
mjohnson [Risk of Data Corruption if Run Improperly]
control_sql_-_find_off-of-balance_sheet_issues [2019/04/23 09:44] (current)
mjohnson [SQL]
Line 53: Line 53:
     WHERE EntryDateTime >= @StartDate     WHERE EntryDateTime >= @StartDate
     GROUP BY Coalesce(DivisionID,​ 10), COALESCE (TransactionID,​ 0), OffBalanceSheet     GROUP BY Coalesce(DivisionID,​ 10), COALESCE (TransactionID,​ 0), OffBalanceSheet
-    HAVING ​   (SUM(Amount) ​ 0)+    HAVING ​   (SUM(Amount)>0)
 ) AS OOBGL ) AS OOBGL