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: REGEXP_like

Re: REGEXP_like

From: Vladimir M. Zakharychev <vladimir.zakharychev_at_gmail.com>
Date: 27 Apr 2007 10:09:26 -0700
Message-ID: <1177693766.630432.287530@u32g2000prd.googlegroups.com>


On Apr 27, 7:53 pm, 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 regexp_like(id,'0[0-9]$')

should do the trick.

Regards,

   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)    http://www.dynamicpsp.com Received on Fri Apr 27 2007 - 12:09:26 CDT

Original text of this message

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