Up Prev Next
From: Lal Bandaru <Lal dot Bandaru at Ebay dot Sun dot COM>
Subject: Re: single quotes in text datatypes
Date: Apr 16 1998 4:25PM
Replace the single quote with two single quotes.
$text =~ s/'/''/g;
> Hope this is an easy one for my first posting:
> How do I insert a TEXT datatype containing a '?
> Read the FAQ, but didn't find a satisfactory solution (the description for
> dbsafestr seems to imply that it will convert ' to "). It's not correct to
> say `David"s book`. Besides - it looks wierd. As would `David`s Book`.
> Perhaps I should invent a code like &^*$-m, which should
> never occur in text, to mean ' :-)
> The Que Sybase book I've got says "TEXT and IMAGE" types are the same, yet
> our server cries when I try to feed it 0x..... expecting a TEXT type. It
> also cries when I try to feed it 'The quick brown fox jumps over the lazy
> dog's tail.'
> Many TIA,
> SOL Bors.