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.
Historical Number
00000673
Product Synonym
Cast Iron Solution;Cast Iron Operating System;Cast Iron Studio
Was this topic helpful?
Document Information
Modified date:
15 June 2018
UID
swg21453254