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

From: Dave Mausner <dmausner_at_brauntech.com>
Date: 1996/09/29
Message-ID: <52m79u$scf_at_client3.news.psi.net>#1/1


In article <324CB498.7A98_at_violet.berkeley.edu>, hagen_at_violet.berkeley.edu wrote:
>I have entered text into Long columns in serveral tables, not realizing
>that the LIKE operator is limited to VARCHAR and VARCHAR2 columns. So
>now, of course, I want to do word match searches and I get error
>messages about using LIKE with LONG columns. My columns are probably
>about 4K, so that's not exactly huge based on the LONG capacity. Is
>there a means of conducting word match searches with the LONG datatype?

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; Received on Sun Sep 29 1996 - 00:00:00 CEST

Original text of this message