Skip to main content

Notifications

Announcements

No record found.

Remove Unused G/L Accounts

A large number of unused G/L accounts can slow down reporting (especially in Management Reporter w/ datamart) but is also down right ugly and muddies up day to day entry.

Outside of clicking through each G/L account and selecting ‘Delete’, there is no quick and easy solution within the application to mass-delete.

Let’s turn this over to SQL where the process is VERY easy.

First.) Create database backup (always create backups before running direct SQL scripts)

Second.) Run scripts to identify accounts that will be deleted.

SELECT * FROM gl00105
where ACTINDX not in (select ACTINDX from GL10001) 
and ACTINDX not in (select ACTINDX from GL20000) 
and ACTINDX not in (select ACTINDX from GL30000)
and ACTINDX not in (select ACTINDX from GL00201)

Third.) Run SQL statement to delete

delete GL00100
where ACTINDX not in (select ACTINDX from GL10001) 
and ACTINDX not in (select ACTINDX from GL20000) 
and ACTINDX not in (select ACTINDX from GL30000)
and ACTINDX not in (select ACTINDX from GL00201)
 
delete [GL00105]
where ACTINDX not in (select ACTINDX from GL10001) 
and ACTINDX not in (select ACTINDX from GL20000) 
and ACTINDX not in (select ACTINDX from GL30000)
and ACTINDX not in (select ACTINDX from GL00201)

delete mc00200
where ACTINDX not in (select ACTINDX from GL00100) 

delete [frl_acct_code]
where rtrim(acct_id) not in (select rtrim(ACTINDX) from GL00100) 

Done.

Comments

*This post is locked for comments