[thelist] Friday Freebie

Anthony Baratta Anthony at Baratta.com
Fri Jun 22 12:14:16 CDT 2001


At 10:06 AM 6/22/2001, you wrote:
>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>

What if someone puts a square bracket in the data itself?

---
Anthony Baratta
President
Keyboard Jockeys

Blatant Plug: Cool Jazz for a hot summer,
     http://LisaMarie.Baratta.com





More information about the thelist mailing list