Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Single quote in search string.
If you want to select rows with a column containing a single quote, then something like
where instr(mystring,chr(13)) > 0
will include any row where mystring has a embedded carriage return.
The correct ascii code for a single quote can be subbed for the 13
(select ascii('''') from dual will give you the ascii code for a single
quote.)
Robert Wagner <RobertWagner_at_alum.mit.edu> wrote in article
<janP4.4439$J81.35501_at_newsr1.maine.rr.com>...
> If I want do search for a single quote, is the only option to double the
> single quote?
>
> In other words is constructing the SQL statement like this the only way
to
>
> ....
Received on Tue May 02 2000 - 00:00:00 CDT