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 |
satishk
Starting Member
39 Posts |
Posted - 2006-09-15 : 03:12:01
|
Hi all,Can anyone tell me how to replace or remove anyspecial characters from a columnSatish |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-09-15 : 03:29:59
|
[code]UPDATE MyTableSET MyColumn = REPLACE(MyColumn, CHAR(10), '')[/code]Replaces CHAR(10) and replaces with empty space.Peter LarssonHelsingborg, Sweden |
 |
|
satishk
Starting Member
39 Posts |
Posted - 2006-09-15 : 03:38:10
|
how to replace enter Satish |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-09-15 : 03:46:44
|
ENTER is char(13) KH |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-09-15 : 04:38:36
|
"any special characters is a bit more of a challenge!Note that you can nest REPLACE:REPLACE(REPLACE(MyColumn, CHAR(13), ''), CHAR(10), '')personally, if there are lots of nestings, I prefer this style of layout:REPLACE(REPLACE( MyColumn , CHAR(13), '') , CHAR(10), '') as it is easy to add "just one more replace!" by adding another "REPLACE(" at the top, and cloning one of the parameter lines lower down.Kristen |
 |
|
|
|
|
|
|