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 |
|
sqlpal2007
Posting Yak Master
200 Posts |
Posted - 2009-11-18 : 07:31:22
|
| Hello All,How woudl I remove special characters and spaces from a string? I have to update a column by removing the spaces and special characters like -, %, #, _ etc.Example - Part# columnRE34-Y 2 should be RE34Y2Any help would be appreciated.Thanks,-S |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-11-18 : 07:35:19
|
| Use multiple replacesupdate tableset col=replace(replace(replace(col,' ',''),'-',''),'#')MadhivananFailing to plan is Planning to fail |
 |
|
|
sqlpal2007
Posting Yak Master
200 Posts |
Posted - 2009-11-18 : 07:44:58
|
| Thanks Madhivanan.That is what I have been using. Is there any alternate way to do it?Thanks,-S |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|