Re: Error: ORA-01704: string literal too long

From: Frank <fbortel_at_nescape.net>
Date: Tue, 18 Nov 2003 21:42:09 +0100
Message-ID: <bpdvnk$v61$1_at_news4.tilbu1.nb.home.nl>


Dave Pylatuk wrote:

> Thanks for responding.
> 
> Do you have an example of using a bind variable ?
> 
> Any help would be appreciated.
> Thanks,
> Dave
> "mcstock" <mcstockspamplug_at_spamdamenquery.com> wrote in message
> news:NaqdnYzsEfdQqyiiRVn-uA_at_comcast.com...
> 

>>according to the error message manual:
>>
>>ORA-01704 string literal too long
>>Cause: The string literal is longer than 4000 characters.
>>Action: Use a string literal of at most 4000 characters. Longer values may
>>only be entered using bind variables.
>>
>>make sure you get yourself a copy for future reference ;-)
>>
>>-- mcs
>>
>>"Dave Pylatuk" <davep_at_centurysystems.net> wrote in message
>>news:U9atb.45866$xI2.1106301_at_news20.bellglobal.com...
>>| Hello, I am getting the above error when executing a large insert
 statement
>>| against 8.1.7.
>>|
>>| This insert statement includes a very large string value, about 8000
>>| characters long. Is there a limit on the size of statements that Oracle
>>| can execute ?
>>|
>>| Is this a setting that can be changed ?
>>|
>>| Thanks in advance.
>>|
>>|
>>|
>>
>>
> 
> 
> 

 insert into bla (a, b, c) values (:x, :y, :z); :x, :y and :z are the bind variables.

Yuou would use it in a statement like:

begin

   for i in 1..100 -- or a select statement

     execute immediate
      'insert into bla (a, b, c) values (:x, :y, :z)'
       using a_variable, another_variable, yet_another;
    end loop;
end;
-- 
Regards, Frank van Bortel
Received on Tue Nov 18 2003 - 21:42:09 CET

Original text of this message