Re: Like, is there a LIKE like operator that functions with LONG columns?

From: janet <janet_at_telesph.com>
Date: 1996/09/30
Message-ID: <324FE8ED.6577_at_telesph.com>#1/1


>
> hagen_at_violet.berkeley.edu wrote:
> > Is there a means of conducting word match searches with the LONG datatype?
> Dave Mausner wrote:
> you could write a PL/SQL function which takes the LONG column name as a
> parameter, treats it like a VARCHAR and performs the matching operation
> internally using PL/SQL's LIKE operator. however you cannot return a boolean
> result from PL/SQL to SQL, so return 0 or 1 instead. your code would look
> like: select blah from blah where MyLike(longcol, '%this%')=1;

Dave,
I had the same question and it worked great! Thanks!

declare

     cursor long_cur is
          select long_col 
          from table;
     long_col_varchar  varchar(240);
begin
     open long_cur;
     fetch long_cur into long_col_varchar;
     if long_col_varchar like '%SEARCH TEXT%'
     then....

 blah blah blah

always looking for info on how to manipulate LONG datatypes... janet Received on Mon Sep 30 1996 - 00:00:00 CEST

Original text of this message