DB2 SQLCODE -433, SQLSTATE: 22001

Habe ich einen trigger im trigger bin ich anfügen viel varchar und die Schaffung eines neuen Datentyps varchar. wenn ich anfügen zu viele varchars dann erhalte ich folgenden Sql-Ausnahme. (wenn ich anfügen, 4 oder 5 varchar, dann bin ich nicht immer diese Fehlermeldung)

Habe ich herausgefunden, dass varchar maximale Größe basiert auf der Seitengröße des von der Tabelle Raum. Ich habe meine Seite Größe, 8K bytes.

Aber die Inhalte, Die ich bin Anhängen ist nicht 8K bytes. Bitte helfen Sie mir, diesen Fehler zu beheben.

Fehler in einer ausgelösten SQL-Anweisung im trigger "ORDDBA.ORD_IR_IN". Informationen zurückgegeben, für die Fehler enthält SQLCODE "-433", SQLSTATE "22001" und die Nachricht Token "ACTION|AREA_UNIT|BAL_CHG_FLAG|CANCEL_DATE|".. SQLCODE=-723, SQLSTATE=09000, DRIVER=3.66.46

declare columnNames varchar(5000);
SET columnNames='';
SET columnNames = 'value1' ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value2') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value3') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value14') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value5') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value6') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value6') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value8') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value9') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value10') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value11') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value12') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value13') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value14') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value15') ;
SET columnNames = CONCAT(columnNames, '|') ;
SET columnNames = CONCAT(columnNames, 'value16') ;
  • Ist dies für DB2 oder oracle? Wenn Ihre DB2 Ihrem tag Lesen sollten, SQL PL nicht plsql
  • dies ist für die DB2-Datenbank.
  • Alrighty werden ich weiß nicht, etwas über DB2-aber doc sagt, daß Ihre end-Zeichenkette ist zu lang. Jetzt ist Ihre Fehlermeldung Hinweise, die Sie auf der Durchreise sind Werte, die anders sind als die generischen value1 usw. Sind Sie vorbei, die mehr als 5000 Zeichen in columnNames?
  • Ja mmmmmpie sind Sie richtig, wenn ich die Anzahl der Zeichen in der varchar seine weniger als 5000, scheint DB2 zählen in unterschiedlicher Weise, so Ihr zu Versagen. Dann änderte ich den Datentyp CLOB, dann seine Arbeit einwandfrei 🙂
InformationsquelleAutor raghav132 | 2015-05-08
Schreibe einen Kommentar