SOLVED: RE: [thelist] SQL apostrophe disorder
Joel D Canfield
joel at spinhead.com
Mon Dec 8 13:42:41 CST 2003
> set @values = ' ''apostrophe between one and two 1''''2''
Bingo! I tried one quote, two, three - I didn't get to four! It writes
to the db as a single quote.
Here's my theory: normally, we'd need two quotes: one as the character,
one to escape it. However, within the multiple nested quoting they've
got going on with this SP (I think it's unnecessary obfuscation) each
quote needs to be escaped *again*, leading to four.
Or, perhaps the two need to be enclosed within quotes, so we've got two
quotes within quotes?
I dunno; I just know *I* won't be writing anything like this on purpose.
Thanks, darren.
joel
More information about the thelist
mailing list