IBM Support

ERRORCODE: 8152 Error Message: [CastIron Systems][SQLServer JDBC Driver][SQLServer]String or binary data would be truncated

Troubleshooting


Problem

At runtime, while inserting the data from DB2 table into SQL Server table, receiving the error "ERRORCODE: 8152 Error Message: [CastIron Systems][SQLServer JDBC Driver][SQLServer]String or binary data would be truncated".

Cause

The value retrieved from the source table gets converted into an encoded format which leads to an increase in data size and while inserting this data in SQL server table the above error occurs.

Resolving The Problem

lease use the varchar function in the select statement of 'Execute Query' activity to convert the encoded data to a readable format before inserting it into SQL Server table.

For example, please see below on how to use the varchar function in the query:

Select VARCHAR(fieldname, fieldmaxlength, 37) FROM TableName.

Note: This error happens when the source database is DB2 and the character code set identifier CCSID 37 is used for the fields in table.

[{"Product":{"code":"SSGR73","label":"IBM Cast Iron Cloud Integration"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"},{"code":"PF009","label":"Firmware"}],"Version":"5.0.1.8;6.1.0.6","Edition":"Virtual;Physical;Cloud","Line of Business":{"code":"LOB45","label":"Automation"}}]

Historical Number

00000673

Product Synonym

Cast Iron Solution;Cast Iron Operating System;Cast Iron Studio

Document Information

Modified date:
15 June 2018

UID

swg21453254