3 Replies Latest reply: Oct 6, 2011 5:04 PM by 673780 RSS

    SP2-0027: Input is too long (> 2499 characters)

    673780
      I've checked out the previous threads regarding this issue and none seem to address the problem I have. My problem is that I have a literal string that is itself > 2499 characters. How would I use SQL*Plus and a script to INSERT a row containing a VARCHAR2 (which has a limit of 4000 bytes) that is > 2499 characters? If I need to break it up, how does one break a line of string? Escape the linefeed somehow?
        • 1. Re: SP2-0027: Input is too long (> 2499 characters)
          673780
          I'd welcome alternatives, as well. I just require being able to create tables, insert data (with varchar2's up to 4000 characters) from a script run on Solaris, Linux and Windows. SQL*Plus almost works if I can figure a way to make it accept really long strings.
          • 2. Re: SP2-0027: Input is too long (> 2499 characters)
            riedelme
            richip wrote:
            I've checked out the previous threads regarding this issue and none seem to address the problem I have. My problem is that I have a literal string that is itself > 2499 characters. How would I use SQL*Plus and a script to INSERT a row containing a VARCHAR2 (which has a limit of 4000 bytes) that is > 2499 characters? If I need to break it up, how does one break a line of string? Escape the linefeed somehow?
            You might need to find another "insert" method - SQL*Loader or an external table instead
            • 3. Re: SP2-0027: Input is too long (> 2499 characters)
              673780
              The solution I ended up using was to break down the long string literal into smaller (< 2500 characters) fragments and just use the concatenation operator (||).

              Now if only there was a way to make Toad spit out SQL INSERT statements that break down strings like this.