GP 2010 - General Ledger accounts

About 100 accounts were added in GP but they aren't needed.  Is there a way in SQL to delete these accounts quickly.  The are not in a range. Our GL string is 3-6-6-6  For example: 100-100066-668799-308907.  Are there any options?

thank you!
pstreAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Victoria YudinOwner / Dynamics GP ConsultantCommented:
You could delete them from the GL00100 table, but then you would need to run Check Links on the financial series to delete them from all the other related tables.

The problem with this approach is that there is no data validation done. So if in the Dynamics GP UI it would have given you an error because that account was used, you will not see that error in SQL. You could inadvertently delete an account that is actually used somewhere in GP and that could cause some serious problems in the future. If you're going to do this, I would at the very least make sure that the Account Index you are going to delete does not appear in the GL10001, GL20000 or GL30000 tables.
0
pstreAuthor Commented:
but how would you delete in SQL if the account numbers are all over the place. They are not in a range...

would it be best for the user to just delete from the front-end of GP?

Thanks!
0
Victoria YudinOwner / Dynamics GP ConsultantCommented:
It certainly would be safer to delete them from the GP user interface. If it's really about 100 accounts, you're probably talking about a couple of hours work.

In SQL, you would need to either find some logic to find all the accounts or get a list of them. For example, if they were all created on the same date, you could search by created date in GL00100. Or if you already have them in Excel you could use that to get a list of the account indexes in SQL. If this is not something that you already have and you'd need to put it together anyway, it will probably not save you any time to do this in SQL. Especially considering the need to run check links afterwards and the danger of deleting an account with activity because there is no safeguard for this in SQL, as I mentioned before.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.