Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: REGEXP_like
On Apr 27, 10:53 am, cptkirkh <k..._at_scic.com> wrote:
> I have to write a SQL query that looks for the last two digits of an
> ID and only includes them in the query. For example
>
> select ID from my_table where regexp_like(id, '00$') between
> regexp_like(id,'09$')
>
> I want only the people who have an id that ends in 00 to 09. Can I do
> this or what is the best way to do this? Thanks for your help.
select id
from my_table
where substr(id, -2) between '00' and '09';
David Fitzjarrell Received on Fri Apr 27 2007 - 11:55:22 CDT