Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how to trim off space in a string

Author  Topic 

jeff06
Posting Yak Master

166 Posts

Posted - 2007-02-22 : 09:21:14
str1 has some space in front of it and after it.
trim(str1) does not seem to work.
what is the right syntax for that?
Thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-22 : 09:23:08
LTRIM
RTRIM

Use both of them you shall. Books Online about string functions read you should.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-22 : 09:23:18
LTrim(RTrim(str1))

Kristen
Go to Top of Page
   

- Advertisement -