Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Substring query

Substring query

From: James Avery <avery_at_wapmore.com>
Date: Thu, 15 Feb 2001 01:41:33 +0100
Message-ID: <3A8B25BD.F1B37EF7@wapmore.com>

Hi,

I have a situation where whole classes of keys correspond to a single database entry - that is, the key in the database should be a pattern rather than an exact string.

What I need is to be able to create a funktion ´lookup´, where  

   lookup(string) = { entry(key) | string matches key }

Alternately it could be

  lookup(string) = { entry(key) | key is a substring of string }

where the entry could be a (regexp,realkey) pair, and I could check the entries of the returned set in turn.

In short, the problem is thus: the strings used to look up entries can be partitioned into parts that contribute to the selection of an entry and parts that are irrelevant - the irrelevant parts being variable. Which parts are which is impossible to determine. On creation of the database, it is known, however.

So, is it possible to make a query that returns the set of entries (or of keys) where the entries' key is a substring of the queried string?

All help is appreciated.

Thanks in advance. Please CC: to email, since the trafic of the newsgroup makes it easy to miss a reply otherwise.

--
  Med venlig hilsen,
    James Avery <avery_at_wapmore.com>
Received on Wed Feb 14 2001 - 18:41:33 CST

Original text of this message

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