Assigned String | Receiving Column or Variable | Description |
Fixed-length (c or char) | Fixed-length | Note: The assigned string is truncated or padded with spaces if the receiving column or variable is not the same length as the fixed length string. If the assigned string is truncated to fit into a host variable, a warning condition is indicated in SQLWARN. For a discussion of the SQLWARN indicators, see SQL Communications Area (SQLCA) (see SQL Communications Area (SQLCA)). |
Fixed-length | Variable-length (varchar, long varchar, or text) | The trailing spaces are trimmed. If the receiving column or variable is shorter than the fixed length string, the fixed length string is truncated from the right side. If the assignment was to a variable, a warning condition is indicated in SQLWARN. For a discussion of the SQLWARN indicators, see SQL Communications Area (SQLCA) (see SQL Communications Area (SQLCA)). Note: If a long varchar value over is assigned to another character data type, the result is truncated at the maximum row size configured but not exceeding 32,000 (16,000 in a UTF8 instance). |
Variable-length (varchar, long varchar, or text) | Fixed-length | The assigned string is truncated or padded with spaces if the receiving column or variable is not the same length as the variable length string. If a long varchar value over is assigned to another character data type, the result is truncated at the maximum row size configured but not exceeding 32,000 (16,000 in a UTF8 instance). |
Variable-length | Variable-length | The variable length string is truncated if the receiving column or variable is not long enough. |