This occurs for CALL, FETCH, SELECT, VALUES INTO or SET assignment statements. The message gives the position number of the variable. SQLSTATE is 42806.
Compatible pairs include numeric with numeric or character, character with character, row ID with row ID, and binary with binary. For datetime values the target must be a character variable of the right length.
Typical causes
The target variable's type is incompatible with the selected column or value.
A datetime value is fetched into a variable that is not a character string of the correct length.
The table definition changed and no longer matches the program's variables.
How to fix it
Use the position number to find the variable.
Verify that table definitions are current.
Verify that the target variable has the correct data type.