Re: Searching for text in a Long

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/12/01
Message-ID: <57qu4q$6ei_at_newton.pacific.net.sg>#1/1


John Homeyard <homeyard_at_worldnet.att.net> wrote:
>Angelito Dizon wrote:
>>
>> What is the best way of SELECTing rows that contain a given text
>> string in a Long column?
>>
>> If the column were not a Long then I could do this:
>>
>> SELECT * FROM mytable WHERE mycolumn LIKE %text%
>>
>> Thanks,
>> Lito
>>
>> Lito Dizon
>> adizon_at_us.netYou may be between a rock and a hard place. Long columns may not be used
>in functions arguments, expressions or where clauses.
>
>John.
>

Hi there,

Write a PL/SQL block. Fetch the value of long column into a VARCHAR2 variable of length 2000. Then use INSTR to find out whether your search string is in the fetched variable.

Regards

N.Prabhakar Received on Sun Dec 01 1996 - 00:00:00 CET

Original text of this message