Re: Searching for text in a Long

From: Vince Cross <bartok_at_nortel.ca>
Date: 1996/12/03
Message-ID: <32A4B653.54AC_at_nortel.ca>#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?
>

In release 7.2, there are some new procedures in the DBMS_SQL package that allow you to fetch long data in chunks. Look at DEFINE_COLUMN_LONG and COLUMN_VALUE_LONG in DBMS_SQL. I haven't used them, but we are looking at them for writing procedures to copy long fields between rows. Good luck.

Vince

-- 
* You morons out there perusing the net for more addresses
* to add to your junk mail lists - BEWARE!  We've got lots of
* bloodthirsty lawyers.  If you send your SPAM to us, Nortel
* will charge you a $150 fee.  This is no joke.
Received on Tue Dec 03 1996 - 00:00:00 CET

Original text of this message