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 -> regular expressions in query under oracle?

regular expressions in query under oracle?

From: JD Austin <jd_at_austin.centergate.com>
Date: Thu, 25 Mar 1999 04:43:56 GMT
Message-ID: <7dceua$i1c$1@nnrp1.dejanews.com>


I have a database field that is a list of integers. groupRead="05,27,10,810,45,15";

The table associated to the groupRead field has a primary key of idnumber which is an integer.

Im trying to return the idnumber's of any records that contain a known idnumber.

The queries I have attempted are:

select idnumber from lists where '10' in groupRead; This almost works, but only returns records where there is ONLY 10 listed.

select idnumber from lists where instr(groupRead,'10')<>0;

This query returns too much.. giving me records that contain the number 10, but the ones that contain 810 (and not 10) too.

I assume I can probably use a regular expression in the where portion of the clause... Anyone know how this is done in Oracle8?

JD

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed Mar 24 1999 - 22:43:56 CST

Original text of this message

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