Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL Server
Expertise: Beginner
Jan 14, 2000



Application Security Testing: An Integral Part of DevOps

Getting Rid of Spaces at the End of a Field

I am accessing a database that has two fields that I need to combine. The problem is that the first field is set to hold eight characters. If the data is less than eight characters, extra spaces are added to make eight. Is there some way of pulling in the data and cutting off the spaces?

I'm not exactly sure of your situation from your question. However, I suggest you look at the LTRIM or RTRIM functions. TLTRIM trims leading blanks, while RTRIM does the same for trailing ones.

DevX Pro
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date