Clob variables in stored procedures and SQL10003C

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jon.Hakkinen@gmail.com

    Clob variables in stored procedures and SQL10003C

    Hi,

    I'm getting SQL10003C when running this stored procedure.
    I declare the clob variable size as 1 G just to be safe for extreme
    cases, when it's reasonable to get the error
    But for most cases the actual size of the clob will be bytes up to 2-3
    MB, in which case I hoped DB2 will just try to allocate the actual
    value, not the declared size. In the real life code, the variable is
    not assigned like this, but read from a column or similar.
    Is there any way to handle this without reducing the declared size of
    the variables? Much appreciated

    CREATE PROCEDURE p
    LANGUAGE SQL

    BEGIN
    declare c clob(1g);
    set c = 'dd';
    END@
Working...