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: SQL 'ESCAPE' Problem

Re: SQL 'ESCAPE' Problem

From: Jurij Modic <jurij.modic_at_mf.sigov.mail.si>
Date: 1997/07/02
Message-ID: <33babbc2.9540967@www.sigov.si>#1/1

On Sat, 28 Jun 97 23:43:23 GMT, NoSpam_at_interaccess.com (Andre Allen) wrote:

>Hello Everyone
>
>I am having trouble with the following SQL Statement
>
>select loc_description
>where loc_description like 'Joe^'s%'
>escape '^'
>
>It seems that I can use the escape character on anything other than a single
>quote mark. The problem is, in mu customer table, I need to track and
>search for names like "Joe's computers" or "Bill's hot dogs". Am I doing
>something wrong?
>
>Any responses would be appreciated

In what tool are you trying to this?

Try puting two single quotes in place of a single quote you want to appear in your output:

        select loc_description
        where loc_description like 'Joe''s%';

At least it works in SQL*Plus and PL/SQL.

>Andre Allen
>NoSpam_at_interaccess.com
>to reply, Please replace "NoSpam" with "andre"

Regards,


Jurij Modic                             Republic of Slovenia
tel: +386 61 178 55 14                  Ministry of Finance
fax: +386 61  21 45 84                  Zupanciceva 3
e-mail: jurij.modic_at_mf.sigov.mail.si Ljubljana 1000
Received on Wed Jul 02 1997 - 00:00:00 CDT

Original text of this message

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