String representations of numeric values

String representations of numeric values can be used in some contexts. A valid string representation of a numeric value must conform to the rules for numeric constants.

The encoding scheme in use determines what type of strings can be used for string representation of numeric values. For ASCII and EBCDIC, a string representation of a numeric value must be a character string. For UNICODE, a string representation of a numeric value can be either a character string or a graphic string. Thus, the only time a graphic string can be used for a numeric value is when the encoding scheme is UNICODE.

Start of changeWhen a decimal number is cast to a string (for example, using a CAST specification), the implicit decimal point is replaced by the default decimal separator character that is in effect when the statement is prepared.End of change

Start of changeWhen a string is cast to a decimal value (for example, using a CAST specification), the default decimal separator character in effect when the statement was prepared is used to interpret the string.End of change

Start of changeWhen a floating point or decimal floating-point number is cast to a string (for example, using a CAST specification), or a string is cast to a floating point or decimal floating-point number, the decimal separator character must be a period (.).End of change

For more information, see Constants.