Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: 2k Limit?
Okay. I'm attempting to update values with the Perl DBI module with which I can
execute sql statements.
What I want to do is:
$dbh->do("declare myvar long default '$longstring'"); $dbh->do("update row set row=myvar where something='something'");
but, the string in myvar has all kinds of weird characters that oracle is
complaining about.
The error is:
. ( * @ % & = - + ; < / > in mod not rem an exponent (**)
<> or != or ~= >= <= <> and or like between is null is not ||
I have no idea what that error message is saying, I just assumed that the special
chars are the cause.
Any clue how I can accomplish this from Perl?
Thanks for the help!
Thomas Kyte wrote:
> A copy of this was sent to foo <blah_at_blah.com>
> (if that email address didn't require changing)
> On Tue, 04 May 1999 15:29:35 +0100, you wrote:
>
> >How can I insert more than 2k at a time into a LONG datatype?
> >
> >Thanks!
>
> what language are you using to get stuff in? you need to use bind variables for
> larger strings instead of character string constants.
>
> One method in SQL plus that works upto 32k is as such:
>
> drop table demo;
> create table demo ( x long );
>
> declare
> myvar long default '
> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> (lots of stuff here)......
> ';
> begin
> insert into demo values ( myvar );
> dbms_output.put_line( length( myvar ) );
> end;
>
> The pl/sql variable can be initialized to upto 32k of static text. It can then
> be inserted into the table (it is a bind variable, not a constant at that
> point).
>
> For example, I just ran it and it showed me:
>
> Table dropped.
>
> Table created.
>
> 24726
>
> PL/SQL procedure successfully completed.
>
> So, that put a 24,726 character string into the table...
>
> See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...
>
> Thomas Kyte
> tkyte_at_us.oracle.com
> Oracle Service Industries
> Reston, VA USA
>
> --
> Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Tue May 04 1999 - 12:23:11 CDT
![]() |
![]() |