Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Belgium
    Posts
    1

    Question Unanswered: Input buffer error

    Hi

    I was running the following script on our old db, but when executing it on a new db (same Oracle version, tables defs, but the new one is UTF-16), I get the following error :

    ORA-22921: length of input buffer is smaller than amount requested

    Script:

    • ...
      FOR trip_rec IN (
      SELECT distinct SKONTO k1 FROM xsum4
      ) LOOP
      UPDATE Calculated_Accounts_formulas ca
      SET FORMULA = trim(simpl_signs(trim(FORMULA) ||
      ( SELECT decode(TKN,1.0,'+' || FORMULA,-1.0,'+' || switch_signs(FORMULA))
      FROM xsum4 inner join Calculated_Accounts_formulas ON SKONTO = ACCOUNT
      WHERE ACCOUNT = trip_rec.k1 AND KONTO = ca.ACCOUNT )))
      WHERE ACCOUNT IN ( SELECT distinct KONTO FROM xsum4 WHERE SKONTO = trip_rec.k1 );
      END LOOP;
      ...

    (the FORMULA field is a CLOB)

    Function:
    • CREATE OR REPLACE FUNCTION switch_signs(form IN CLOB) RETURN CLOB is
      BEGIN
      if substr(form,0,1)<>'+' and substr(form,0,1)<>'-' then
      return '-' || replace(replace(replace(form,'+','$'),'-','+'),'$','-');
      else
      return replace(replace(replace(form,'+','$'),'-','+'),'$','-');
      end if;
      END;

    I found this on the web:
    • ORA-22921: length of input buffer is smaller than amount requested
      Cause: The buffer length was not big enough to hold the amount of data requested.
      Action: Verify that the number of bytes/characters specified in the input amount parameter is not bigger than the number of bytes specified in the input buffer length parameter. Allocate more space for the input buffer if necessary.

    Any idea how I can increase the input buffer size ?

    Cheers
    Lunkaar

  2. #2
    Join Date
    Jan 2009
    Posts
    1

    have the same problem

    what I have found is that TRIM of CLOBs sometimes brings this error. It depends of CLOB content. Now I'm looking, how can I solve this problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •