2017-09-11 6 views
0

の列「sql_stmtに」の長すぎるここに私のXMLコードがデータ切り捨て:データ行1

<insert id="insertAnnualKiln" parameterType="list"> 
     insert into prm_annual_kiln (id,parent_id,runtime_kiln,runtimerate_kiln,shutdowntime_kiln, 
     shutdowndesc_kiln,heat_clinker,elect_clinker,equip_code,prod_clinker_type) VALUES 
     <foreach collection="list" item="item" separator=","> 
      (#{item.id},#{item.parentId},#{item.runtimeKiln},#{item.runtimerateKiln}, 
      #{item.shutdowntimeKiln},#{item.shutdowndescKiln},#{item.heatClinker},#{item.electClinker} 
      ,#{item.equipCode},#{item.prodClinkerType}) 
     </foreach> 
    </insert> 

あるリスト36個の要素を持って、私は10個の要素にリストをcuttedとき、それはsuccessedた、ここにありますエラー。

### SQL: insert into prm_annual_kiln (id,parent_id,runtime_kiln,runtimerate_kiln,shutdowntime_kiln, shutdowndesc_kiln,heat_clinker,elect_clinker,equip_code,prod_clinker_type) VALUES   (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) ,  (?,?,?,?, ?,?,?,? ,?,?) 
### Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sql_stmt' at row 1 
; SQL []; Data truncation: Data too long for column 'sql_stmt' at row 1; nested exception is com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'sql_stmt' at row 1 
+0

どのようにウラ表の構造。問題は列サイズよりもデータを挿入しようとしていることです。 – Balasubramanian

答えて

0

テーブル内のカラムsql_stmtの定義を変更して、より長い長さに設定します。のような:

ALTER TABLE <table_name> MODIFY sql_stmt VARCHAR(<a longer length>); 
+0

この列はありません... – pingandpong

+0

この列は他の表にありますか? –

関連する問題