Explanation of SQL
GL Accounts in Control are ordered in a hierarchy, with all GL Accounts under Groups. Occassionally, a GL Account may be in Control that is not under a valid GL Account Group. In this case the account will show in certain cases (when Accounts are listed in a flat list) but not in cases when the hierarchy is used.
This query shows any GL Accounts or GL Account Groups that are not under a valid account group. It should return no results. If any results are found, they will need to be manually edited and changed so that the AccountGroupID is under a valid (and correct) 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
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
You could leave a comment if you were logged in.