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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL quoting question

Re: SQL quoting question

From: Arjan van Bentem <avbentem_at_DONT-YOU-DARE-cable.a2000.nl>
Date: Sun, 19 Jul 1998 09:54:15 +0200
Message-ID: <6os8n2$e93$1@newton.a2000.nl>


In SQL*Plus, you need

    set escape=\

to use the backslash like you're used to in Unix. If only the ampersand is giving you trouble, as SQL*Plus will prompt you to enter a value, then consider using another parameter identifier, like the ^, using

    set define='^'

However, as you ask for quoting the underscore and % as well, I guess you're using LIKE(..). Suppose you want to search for anything containg a percent sign. Then use:

    where replace( my_column, '%', '@' ) like '%@%'

Arjan. Received on Sun Jul 19 1998 - 02:54:15 CDT

Original text of this message

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