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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Help: Oracle "select" statement question!!

Re: Help: Oracle "select" statement question!!

From: terryg8 <trg_at_ibm.net>
Date: 1997/07/23
Message-ID: <33D6A33C.4A01@ibm.net>#1/1

John Dixon wrote:
>
> Hello fellow Oracle people,
>
> I need your assistance.
>
> I am trying to perform the following Oracle statement:
>
> select TO_CHAR(id) from message_data where organization = "org" AND
> TO_CHAR(id) NOT IN (select seen_urls from smartpage_data);
>
> I am trying to search for an occurence substring "id" in the result of
> the "select seen_urls from smartpage_data" statement which returns a
> string. The NOT IN function does not check for occurences of
> substring. It just checks the entire string.
>
> Is there a function or method I can use to serarch for the occurence of
> a substring in the result of a select statement?
>
> Thank You
>
> John Dixon

How about
select TO_CHAR(id)
from message_data
where organization = "org"
AND NOT EXISTS (select null

                from smartpage_data
                where instr(seen_urls,to_char(id)) >0));

Cheers,
Terry Received on Wed Jul 23 1997 - 00:00:00 CDT

Original text of this message

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