Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


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

Getting Rid of Spaces at the End of a Field

Question:
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?

Answer:
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.

 

 

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