[thelist] Friday Freebie

Scott Dexter sgd at ti3.com
Fri Jun 22 12:10:06 CDT 2001


I can't take credit for this one, it goes to another guy here at work

<tip type="SQL Server 7" subject="fergit thems doubling up on the single
quotes">
How's this for a sexy trick. Instead of replacing single ticks (') with two
('') so that SQL Server likes them, wrap the entire string in square
brackets, like so: [Jeff O'Malley]

Not only does that save processing time to do the search and replace, it
also covers up other special characters that may be lurking in the string.
</tip>

sgd
--
work: http://ti3.com/
non: http://thinksafely.org/ 




More information about the thelist mailing list