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

From: <monsri_at_my-deja.com>
Date: Fri, 18 Aug 2000 14:52:54 GMT
Message-ID: <8njijr$v0l$1_at_nnrp1.deja.com>


Hi,
[Quoted] 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 - 16:52:54 CEST

Original text of this message