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: <saropani_at_my-dejanews.com>
Date: Wed, 03 Jun 1998 07:02:24 GMT
Message-ID: <6l2se0$9sq$1@nnrp1.dejanews.com>


In article <6l2fdb$paq$1_at_nnrp1.dejanews.com>,   hyseo_at_samsung.co.kr wrote:
>
> Dear Oracle Professionals.
>
> Hi I'm a new user of ORACLE.
>
> 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
>
> HELP me
>
> Thanks
>
> HaengYong
>

Hi HaengYong,

As in Sybase you can't specify a range of values inside like operator. However you can achive the same with the following: (may be slower)

SELECT * FROM TABLE WHERE SUBSTR(field1,1,1) IN ('A','B','C','D','E','F','G');

Regards,
Saravanan

> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Wed Jun 03 1998 - 02:02:24 CDT

Original text of this message

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