Re: Searching for text in a Long

From: Andrew Smalera <andrew.smalera_at_cplc.com>
Date: 1996/12/03
Message-ID: <32A4B081.313E_at_cplc.com>#1/1


Angelito Dizon wrote:
>
> On 1 Dec 1996 03:30:34 GMT,
> N Prabhakar <prabhs_at_po.pacific.net.sg> wrote:
>
> >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.
>
> Thanks for your input. The above would work if the search string is within
> the first 2000 chars of the LONG. What can I do if it occurs beyond the
> 2000th position?
>
> Lito
>
> Lito Dizon
> adizon_at_us.net

I haven't thought about this very deeply, but I would think you can get pieces of it at a time - if it is not in the first 2000 characters, get the next 2000, etc...

Actually I just flipped through my Oracle book and found the functions - look at DEFINE_COLUMN_LONG and COLUMN_VALUE_LONG in the DBMS_SQL package. It looks like they do what you want. Received on Tue Dec 03 1996 - 00:00:00 CET

Original text of this message