Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: pattern matching query
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