Differences
This shows you the differences between two versions of the page.
control_sql_-_check_that_gl_accounts_are_under_valid_categories [2019/01/27 11:28] |
control_sql_-_check_that_gl_accounts_are_under_valid_categories [2019/01/27 11:28] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== | ||
+ | |||
+ | |||
+ | |||
+ | ===== Explanation of SQL ===== | ||
+ | |||
+ | |||
+ | |||
+ | GL Accounts in Control are ordered in a hierarchy, with all GL Accounts under Groups. | ||
+ | |||
+ | |||
+ | |||
+ | This query shows any GL Accounts or GL Account Groups that are not under a valid account group. | ||
+ | |||
+ | |||
+ | |||
+ | ===== Risk of Data Corruption if Run Improperly ===== | ||
+ | |||
+ | **None**. This is a selection query and no data is modified in the running of it. | ||
+ | |||
+ | |||
+ | |||
+ | ===== SQL ===== | ||
+ | |||
+ | |||
+ | |||
+ | <code sql> | ||
+ | SELECT * | ||
+ | FROM GLAccount WITH(nolock) | ||
+ | WHERE AccountGroupID NOT IN | ||
+ | (SELECT ID | ||
+ | FROM GLAccount WITH(nolock) | ||
+ | WHERE ClassTypeID in (8000, 8050)) | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Version Information ===== | ||
+ | * Entered : 7/1/2009 | ||
+ | * Version : Control 4.3 | ||
+ | |||
+ | |||
+ | |||