Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help: Oracle "select" statement question!!
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
![]() |
![]() |