Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help: Oracle "select" statement question!!
This might work:
if you can do it based on a known delimiter in the seen_urls (like a space or ';') then you can build a dynamic sql statement which will get you where you need to be by doing a translate in the first select (from smart_page) to produce a correct IN(' ',' ',etc.) format which you then concatenate with the varchar holding the remainder of your statement ['select TO_CHAR(id) from message_data where organization = 'org' and TO_CHAR(id) NOT IN ('+translated-string+')'].
In article <33D68D8D.40C22ADB_at_mitre.org>, jdixon_at_mitre.org says...
>
>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
>
Received on Thu Jul 24 1997 - 00:00:00 CDT