Error: ORA-01704: string literal too long

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Pylatuk

    #1

    Error: ORA-01704: string literal too long

    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.



  • mcstock

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

    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@centurys ystems.netwrote in message
    news:U9atb.4586 6$xI2.1106301@n ews20.bellgloba l.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.
    |
    |
    |


    Comment

    • Dave Pylatuk

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

      Thanks for responding.

      Do you have an example of using a bind variable ?

      Any help would be appreciated.
      Thanks,
      Dave
      "mcstock" <mcstockspamplu g@spamdamenquer y.comwrote in message
      news:NaqdnYzsEf dQqyiiRVn-uA@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@centurys ystems.netwrote in message
      news:U9atb.4586 6$xI2.1106301@n ews20.bellgloba l.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.
      |
      |
      |
      >
      >

      Comment

      • Frank

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

        Dave Pylatuk wrote:
        Thanks for responding.
        >
        Do you have an example of using a bind variable ?
        >
        Any help would be appreciated.
        Thanks,
        Dave
        "mcstock" <mcstockspamplu g@spamdamenquer y.comwrote in message
        news:NaqdnYzsEf dQqyiiRVn-uA@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@centurys ystems.netwrote in message
        >>news:U9atb.45 866$xI2.1106301 @news20.bellglo bal.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_variabl e, yet_another;
        end loop;
        end;

        --
        Regards, Frank van Bortel

        Comment

        Working...