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.
| Author |
Topic |
|
RichardSteele
Posting Yak Master
160 Posts |
Posted - 2003-03-07 : 21:31:42
|
| What is the SQL trim function? I'm trying to find the datalength of column and need to trim the spaces at the end of that column. Thanks in advance. |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2003-03-07 : 21:34:45
|
| LTRIM for Trimming spaces from the leftRTRIM for Trimming spaces from the rightTake a look at BOL for more specifics.Make sure you look under topicsp_dbcmptlevelfor a discussion on how it affects the results of the trimming functions. |
 |
|
|
RichardSteele
Posting Yak Master
160 Posts |
Posted - 2003-03-07 : 21:48:29
|
| Thanks. The Rtrim doesn't seem to work on text fields. Please advise. |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2003-03-07 : 23:44:31
|
| Two options that I see 1.use readtext,updatetext, and Patindex to process text data and remove spaces.2.a.BCP data outb.write a vb script to trim input lines and write output filec.BCP data in from output file. |
 |
|
|
|
|
|