Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Single quote in search string.

Re: Single quote in search string.

From: rob <rob_at_sam.on-net.net>
Date: 2000/05/02
Message-ID: <01bfb3e1$97f39600$072f2bd1@robjoss>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US