Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Big trouble implementing a search on a LONG field...
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