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.

Share It
Share It
Tweet It
Picture of Kyle Malone, CPA
Kyle Malone, CPA

Dynamics GP Nut | GPUG All-Star 🏆 | Techo-Functional Consultant

2 thoughts on “Remove Unused G/L Accounts”

Leave a Comment

Your email address will not be published. Required fields are marked *

30 Dynamics GP Tips & Tricks That You Cannot Live Without

Provide your email and we’ll send you our list of 30 things in GP that will have you feeling like

Send me 30 Tips & Tricks! (absolutely free)

Top-Tier Professional Consulting
Rates Lower Than The Others

Always non-billable introductory / discovery calls

$140 hour which includes ANY/ALL GP services:

  • GP Training
  • Module Implementation
  • Everyday Support
  • Report Development
  • Integration Development

We Want to See You Get Value From Your Investment In Dynamics GP!

Contact Us

ALaCarteGP, LLC | (740) 604-0099 | Madisonville, LA