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 -> Big trouble implementing a search on a LONG field...

Big trouble implementing a search on a LONG field...

From: <monsri_at_my-deja.com>
Date: Fri, 18 Aug 2000 14:51:45 GMT
Message-ID: <8njihn$uol$1@nnrp1.deja.com>

Hi,
Has someone already implemented a function that returns true if the string passed as its parameter is contained in a LONG field ??
You know you can't do a ..WHERE <long field> LIKE '%XXX%', that's why I'd like to be able to do as follows:
> SELECT...
> FROM <myTable>
> WHERE isItInMyLongField('%XXX%');

where the function ISITINMYLONGFIELD would look like:
> create or repl. function ISITINMYLONGFIELD(param in varchar2)
> return boolean
> is
> l_string varchar2(32767);
> begin
> select <myLongField> into l_string
> from <myTable>
> where .. // !! <= the big problem comes from here !!
> ...
> if l_string like param then
> return true;
> else
> return false;
> end if;
> end;
> /

Does someone have already succeeded in such an implementation ??

Thanks a lot !

Seb

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Aug 18 2000 - 09:51:45 CDT

Original text of this message

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