GP 2013 - Account Description

When  exporting to Excel from a Smartlist, some of the columns are getting moved to another row. We have discovered that having a space after the account description is causing this. Does anyone have SQL code that will help us determine which Account Descriptions (GL00100) have spaces at the end of the description.  The auditors are with us and we need to give them data.  THANKS!!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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:
Dynamics GP pads all strings with spaces at the end when they are stored in SQL. So if the length of the account description can be 50 characters and your account description is 20 characters, it will be stored in the GL00100 table as your 20 characters plus 30 spaces.

In my experience what you're seeing is caused by "special" characters that may look like spaces, but are not. Often this happens when data is copied into GP from Excel. I am not sure if there is any easy way to identify them in SQL unless you can identify what the special character is, however I have seen a 'carriage return' cause this issue a few times.

If that is the case, you should be able to find these by using the following script:

select * from GL00100 where ACTDESCR like '%'+char(13)+'%'

Open in new window

If that does find results and you can confirm these are the accounts you see a problem with, you can use the following script in SQL to fix it:

update GL00100 
set ACTDESCR = replace(ACTDESCR,char(13),'')
where ACTDESCR like '%'+char(13)+'%'

Open in new window

If that does not find the issue, or all of the accounts with the issue, what you can do is run a SmartList with all your GL accounts, make sure you have a column after the account description, export it to Excel and you will see what the accounts with issues are. Then you can fix these manually one at a time. Hopefully there are not too many.

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
Tax / Financial Software

From novice to tech pro — start learning today.