Previous Topic: Numeric AssignmentsNext Topic: Assignment for Dates, Times, and Timestamps


String Assignment

The basic rule of string assignment is that the length of a string assigned to a column must not be greater than the length attribute of the column. Trailing blanks are included in the length of the string.

When a string is assigned to a fixed-length string column or variable and the length of the string is less than the length attribute of the target, the string is padded on the right with the necessary number of blanks.

When a string is assigned to a variable and the string is longer than the length attribute of the variable, the string is truncated on the right by the necessary number of characters.