From: "Vladimir M. Zakharychev" <vladimir.zakharychev@gmail.com>
Newsgroups: comp.databases.oracle.server
Subject: Re: REGEXP_like
Date: 27 Apr 2007 10:09:26 -0700
Organization: http://groups.google.com
Lines: 19
Message-ID: <1177693766.630432.287530@u32g2000prd.googlegroups.com>
References: <1177689229.180452.166930@r35g2000prh.googlegroups.com>
NNTP-Posting-Host: 217.15.147.190
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1177693773 25387 127.0.0.1 (27 Apr 2007 17:09:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 27 Apr 2007 17:09:33 +0000 (UTC)
In-Reply-To: <1177689229.180452.166930@r35g2000prh.googlegroups.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: u32g2000prd.googlegroups.com; posting-host=217.15.147.190;
   posting-account=7srsFw0AAADBBht5vVKjvzMbApNGydkb
Path: news.f.de.plusline.net!news-fra1.dfn.de!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!feed.ac-versailles.fr!proxad.net!64.233.160.134.MISMATCH!postnews.google.com!u32g2000prd.googlegroups.com!not-for-mail
Xref: news.f.de.plusline.net comp.databases.oracle.server:197019

On Apr 27, 7:53 pm, cptkirkh <k...@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

