Mark Breen
marklbreen at gmail.com
Thu Oct 22 09:27:36 CDT 2009
Hello John,
As they say, when you only have a hammer, everything looks like a nail.
My hammer is my SQL Skills, and I know that I sometimes use them where C#
would be more appropriate, I see from Shamils code how easy it is in .Net
also,
anyway, we all have the options now of c#, PB and TSQL.
Glad it worked,
thanks
Mark
2009/10/21 jwcolby <jwcolby at colbyconsulting.com>
> 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
>
> _______________________________________________
> dba-VB mailing list
> dba-VB at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-vb
> http://www.databaseadvisors.com
>
>