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 |
|
Rheinhardt
Yak Posting Veteran
66 Posts |
Posted - 2009-05-28 : 08:17:34
|
| Hi,I have a column with Names wich I copied from an excell sheet but in doing that all the names has trailing spaces:ColumnaSally Mia_____Peter Smith__How do delete all the trailing spaces without deleting the spaces within the name and surname?Thanks |
|
|
Dev@nlkss
134 Posts |
Posted - 2009-05-28 : 08:19:34
|
| Use RTRIM()$atya.Love All Serve All. |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-05-28 : 08:21:31
|
update tableset column = rtrim(column) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
Rheinhardt
Yak Posting Veteran
66 Posts |
Posted - 2009-05-28 : 08:25:40
|
| Thanks |
 |
|
|
Prasanthp2006
Starting Member
1 Post |
Posted - 2009-05-28 : 13:33:24
|
| update [Tablename] set fieldname=replace(fieldname,' ','')Regards,Prasanth P |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-05-28 : 13:43:40
|
quote: Originally posted by Prasanthp2006 update [Tablename] set fieldname=replace(fieldname,' ','')Regards,Prasanth P
this will even remove in between spaces which is not what OP wants |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-05-29 : 02:12:48
|
quote: Originally posted by Prasanthp2006 update [Tablename] set fieldname=replace(fieldname,' ','')Regards,Prasanth P
Read the question again MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|