[dba-VB] SPAM-LOW: Re: C# replace a special character

jwcolby jwcolby at colbyconsulting.com
Wed Oct 21 10:46:47 CDT 2009


Jay,

Thanks for that.  I figured it out, added the special characters that I need and tested it and it is 
working great.  And pretty darned fast IMHO.  I did a replace on one field, 62.8 million records, 
2:52 (three minutes).

Machine specs: AMD 3GHz quad core, 16g RAM, Windows 2003 x64.  Three cores assigned to SQL Server.

John W. Colby
www.ColbyConsulting.com


Hunnicutt, Jay E. (Civ) wrote:
> John,
> 	Just add the comma into the accepted characters like
> patindex('%[^a-zA-Z0-9, ]%', @s). Also I tested on a string with spaces
> and the spaces are left in the return as they are not a part of the
> condition.
> 
> Query:
>  select dbo.F_DropSpecChar('abc fge, 123, NC')
> 
> Returns:
> 
> abc fge, 123, NC
> 
> Jay Hunnicutt




More information about the dba-VB mailing list