Differences

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

Link to this comparison view

control_sql_-_invalid_gl_entries [2019/01/27 11:29]
127.0.0.1 external edit
control_sql_-_invalid_gl_entries [2019/02/05 11:32] (current)
admin
Line 31: Line 31:
 SELECT SELECT
 AccountName ​ AccountName ​
-, GLA.ID ​as GLAccountID +, GLA.ID ​AS GLAccountID 
-, GLAccountID ​as LedgerGLAccountID+, GLAccountID ​AS LedgerGLAccountID
 , GLA.GLClassificationType , GLA.GLClassificationType
-, GL.GLClassificationType ​as LedgerGLClassificationType+, GL.GLClassificationType ​AS LedgerGLClassificationType
 , GLA.GLClassTypeName , GLA.GLClassTypeName
-, GL.GLClassTypeName ​as LedgerGLClassTypeName+, GL.GLClassTypeName ​AS LedgerGLClassTypeName
 , GL.EntryDateTime , GL.EntryDateTime
 FROM Ledger GL FROM Ledger GL
  LEFT JOIN GLAccount GLA ON GLA.ID = GL.GLAccountID  LEFT JOIN GLAccount GLA ON GLA.ID = GL.GLAccountID
 WHERE GL.ID > 0  WHERE GL.ID > 0 
-  AND ( GL.GLClassificationType ​ GLA.GLClassificationType+  AND ( GL.GLClassificationType ​<> ​GLA.GLClassificationType
   OR GLA.AccountName IS NULL   OR GLA.AccountName IS NULL
   OR GL.GLClassificationType >= 7000   OR GL.GLClassificationType >= 7000
Line 59: Line 59:
 SELECT SELECT
 AccountName ​ AccountName ​
-, GLA.ID ​as GLAccountID +, GLA.ID ​AS GLAccountID 
-, GLAccountID ​as LedgerGLAccountID+, GLAccountID ​AS LedgerGLAccountID
 , GLA.GLClassificationType , GLA.GLClassificationType
-, GL.GLClassificationType ​as LedgerGLClassificationType+, GL.GLClassificationType ​AS LedgerGLClassificationType
 , GLA.GLClassTypeName , GLA.GLClassTypeName
-, GL.GLClassTypeName ​as LedgerGLClassTypeName+, GL.GLClassTypeName ​AS LedgerGLClassTypeName
 , GL.EntryDateTime , GL.EntryDateTime
 FROM Ledger GL FROM Ledger GL
  LEFT JOIN GLAccount GLA ON GLA.ID = GL.GLAccountID  LEFT JOIN GLAccount GLA ON GLA.ID = GL.GLAccountID
 WHERE GL.ID > 0  WHERE GL.ID > 0 
-  AND ( GL.GLClassificationType ​ GLA.GLClassificationType+  AND ( GL.GLClassificationType ​<> ​GLA.GLClassificationType
   OR GLA.AccountName IS NULL   OR GLA.AccountName IS NULL
   OR GL.GLClassificationType >= 7000   OR GL.GLClassificationType >= 7000
Line 81: Line 81:
 GO GO
 DROP VIEW GLAcctTypeFix DROP VIEW GLAcctTypeFix
 +
 </​code>​ </​code>​