Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Problems with LONG datatypes
Okay, in case anyone else is having this problem, I've found
a workaround. No procedures, just some PL/SQL:
declare
insertText long default='[lots and lots of text here]';
begin
insert into my_table (text) values (insertText);
end;
The basic approach seems to work, though I'm having trouble getting some data clean enough that it doesn't screw up the parsing -- tend to get "Encountered the symbol... when expecting..." errors.
David Moles wrote:
>
> I'm trying to import some values into LONG columns, and the
> values are longer than the 2000-character limit on quoted
> strings. So I thought I'd break the value into 2000-character
> blocks, insert the first block, and iterate through the
> remaining blocks using a procedure to append them to the
> current value. Only problem is I can't figure out how to
> append them. I tried writing a procedure like this:
>
> create procedure appendValue
> (appendID in number, appendText in long) is
> begin
> update my_table
> set text = text||appendText where id = appendID;
> end;
>
> but when I ran it I got "Inconsistent dataypes." And then
> when I started looking into that you can't use the ||
> operator with LONGs.
>
> Any suggestions? Surely there must be a way to get long data
> into the system, or they wouldn't provide a LONG datatype.
>
> --------------------------------------------------
> David Moles Fort Point Partners, Inc.
> (415)537-7027 dmoles_at_ftpoint.com
> --------------------------------------------------
--
David Moles Fort Point Partners, Inc. (415)537-7027 dmoles_at_ftpoint.com --------------------------------------------------Received on Mon Sep 14 1998 - 16:21:23 CDT