|
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
We have an issue where the legacy application allows control codes to be pasted into text fields. When we pull the data down into SQL it causes problems. Here is a function I use to clear them out. create function dbo.fnStripCC (@vc varchar(4000)) RETURNS varchar(4000) AS BEGIN declare @x int set @x=0 while @x<31 begin set @x=@x+1 set @vc=replace(@vc,char(@x),'') end set @vc=replace(@vc,char(127),'') return @vc END Hope it s someone! David Hay |
|
![]() |
| Outils de la discussion | |
|
|