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 |
|
saurabh122
Starting Member
16 Posts |
Posted - 2009-09-10 : 03:24:47
|
| Hi,I have a string variable that has a few control characters. (control characters are the ones having their ascii values between 0 and 31). How do i remove them?i guess using patindex we can do so. but i am somehow not able to create the regex pattern for the same. please help..... |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-10 : 03:36:06
|
I would create an UDF that returns the string without control chars by stepping through the string char by char. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
saurabh122
Starting Member
16 Posts |
Posted - 2009-09-10 : 04:03:35
|
| is there any way we can accomplish this using a T-sql statement? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
saurabh122
Starting Member
16 Posts |
Posted - 2009-09-10 : 04:11:01
|
| thanks a lot guys....but is there a way we can eliminate the looping? |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2009-09-10 : 04:32:59
|
This would need real regex and that isn't in T-SQL. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|