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

Home -> Community -> Usenet -> c.d.o.tools -> Re: How to write a SQL statement pull out string data contain '%'

Re: How to write a SQL statement pull out string data contain '%'

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 2 Dec 2000 20:07:09 +0100
Message-ID: <90bj51$jeeg$1@ID-62141.news.dfncis.de>

"Helen Jian" <helenjian_at_attcanada.ca> wrote in message news:Uo9W5.3665$tj4.10296_at_tor-nn1.netcom.ca...
> Hi All,
>
> For example, one table has a varchar2(20) column, there are three rows in
> this table:
>
> 1 'Mon%day'
> 2 'Tuesday'
> 3 'Wedne%sday'
>
> Anyone know how to write a SELECT statement pull out row 1 and 3 which
> contain '%' character?
>
> Thanks in advance
> Helen
>
>

Add
escape '%' to your select statement.
Obviously the % is a character which should be avoided.

Regards,

Sybrand Bakker, Oracle DBA Received on Sat Dec 02 2000 - 13:07:09 CST

Original text of this message

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