4. Elements of QUEL Statements : Operations : Assignment : Character String
 
Share this page                  
Character String
All character types are comparable with one another; you can assign any character string to any column or variable of character data type. The result of the assignment depends on the types of the assignment string and the receiving column or variable.
Assigned String
Receiving Column or Variable
Description
Fixed-length
(c or char)
Fixed-length
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.
Fixed-length
Variable-length (varchar or text)
Trailing blanks 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.
Variable-length (varchar or text)
Fixed-length
The variable length string is truncated or padded, as necessary, if the receiving column or variable is not the same length as the variable length string.
Variable-length
Variable-length
The variable length string is truncated if the receiving column or variable is not long enough.