What it means
A casting operation produced a value longer than the target type, so Db2 truncated it. This can come from a CAST specification, from built-in functions such as CHAR or VARCHAR, or from user-defined functions that cast their parameters.
The statement completes, but the returned value is shorter than the original.
Typical causes
- CAST(column AS CHAR(n)) or VARCHAR(column, n) with n smaller than the data.
- A user-defined function whose parameter or return type is shorter than the input.
- A sourced function that needs a conversion.
How to fix it
- Find the cast or function in the statement that shortens the value.
- Make the target length big enough, or trim the data deliberately.
- Check that the truncated output does not cause wrong results further on.