Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Long Datatype: How to get anything out???

Re: Long Datatype: How to get anything out???

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 9 Sep 1999 09:45:16 +0200
Message-ID: <7r7ojm$8lh$1@oceanite.cybercable.fr>


The only way i know to manipulate a long field is to use a PL/SQL bloc with a varchar2 local variable. It works if data length is less than 32k.

For example:
declare

   long_field varchar2(32760);
   my_substring varchar2(100);
   cursor cc is

      select long_col from my_table;
begin

   open cc;
   loop

      fetch cc into long_field;
      exit when cc%notfound;
      if ( long_field like '%foo%' ) then
         my_substring := substr(long_field,instr(long_field,'foo'),100);
      else
         my_substring := 'doesn''t contain foo';
      end if;
      ...

   end loop;
end;

news.opentext.com a écrit dans le message <7r6b5h$28q2_at_enews4.newsguy.com>...
>Greetings.
>I have a lot of data stored in a Long (several k at least). How can I do
>anything with it? I can't use Instr, Substr, Like, etc, etc. on a Long. Is
>there a conversion function I should use? (TO_CHAR doesn't work).
>
>Thanks for any thoughts
>
>
Received on Thu Sep 09 1999 - 02:45:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US