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: pattern matching query

Re: pattern matching query

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: Thu, 04 Jun 1998 00:58:47 GMT
Message-ID: <6l4rg8$1n@bgtnsc02.worldnet.att.net>


On Wed, 03 Jun 1998 03:20:11 GMT, hyseo_at_samsung.co.kr wrote:

>I came from Sybase DB server experience.
>
>In Sybase I used select statement like belows.
> ==> select * from table where field like '[A-G]%'
> select * from table where field like 'A[ABGHI]%'
>
>In ORACLE SQL this expression is not recognized
>I have read the Oracle SQL manual but I have not found the solution

Oracle does allow the use of LIKE. The two pattern match characters are % and _ (percent and underscore). The % matches any number of characters, while the underscore matches any one character. That's it. The bracket syntax that you are using above is not supported. Here are some examples:

        Jo% will match Jonathan, Jon, John, etc.

        J_n will match Jon, Jan, Jen, etc.

hope this helps.

Jonathan Received on Wed Jun 03 1998 - 19:58:47 CDT

Original text of this message

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