| Author |
Topic |
|
gemispence
Yak Posting Veteran
71 Posts |
Posted - 2006-03-09 : 14:28:50
|
| I need to trim what looks like two spaces from a field. Example:" 601274" needs to be "601274". Does anyone know the syntax?+ |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
gemispence
Yak Posting Veteran
71 Posts |
Posted - 2006-03-09 : 15:08:15
|
| So it will be LTRIM(AccountID)??? |
 |
|
|
Tahsin
Starting Member
34 Posts |
Posted - 2006-03-09 : 15:10:31
|
| Yes, if that's the name of your column. LTRIM will remove all spaces in the front and RTRIM will remove trailing spaces. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-03-09 : 15:22:00
|
quote: Originally posted by gemispence So it will be LTRIM(AccountID)???
Why don't you try it rather than asking? Also, you should do some reading on all of the character functions available in T-SQL in SQL Server Books Online as LTRIM would have been fairly quick to find in BOL.Tara Kizeraka tduggan |
 |
|
|
gemispence
Yak Posting Veteran
71 Posts |
Posted - 2006-03-09 : 15:30:28
|
| I did try it and it did look at the documentation. The problem was that I was using [] instead of (). This is a beginner's forum so why don't you cut us some slack. Thanks. :) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-03-09 : 15:38:19
|
| With 70 posts already, it's hard to believe that you'd still be a newbie to SQL Server. But feel free not to read my posts if I'm not giving any slack.Tara Kizeraka tduggan |
 |
|
|
gemispence
Yak Posting Veteran
71 Posts |
Posted - 2006-03-09 : 15:55:09
|
| With pleasure. How about you not respond to any of my posts either? Thanks. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-03-09 : 15:56:32
|
| I can't keep track of who wants me to respond and who doesn't.Tara Kizeraka tduggan |
 |
|
|
|