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 |
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2005-07-07 : 06:16:01
|
hello,Am trying to remove trailing spaces in my database.How do i achieve this ? am running the query below to get the first 11 characters, without trailing spacesinsert into afrikaselect number = (case 080 when '080' then '234'+ right(number,10)end)from ehiozeselect * from afrika I would like to trim the right(number,10) to omit spacesthanksAfrika |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-07-07 : 06:23:16
|
| use rtrim(number)?--------------------keeping it simple... |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2005-07-07 : 06:32:21
|
| Ok thanks JenIt works. I was mixed up there |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-07-07 : 07:02:00
|
it happens sometimes --------------------keeping it simple... |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2005-07-07 : 07:13:19
|
I had it all mixed up with ASP codeHere's my final codeinsert into afrikaselect number = (case 080 when '080' then '234'+ right(rtrim(phone),10)end)from ehiozeselect * from afrika |
 |
|
|
|
|
|