CAST is a complex function that transforms one or more values from one data-type into another.
CAST transforms the value of one data-type into another data-type. precision and scale can be integer literals only. Expressions are not supported. For a description of precision, scale, and interval_qualifier, see ESQL data types.
Not all conversions are supported;
see Supported casts for a list of supported conversions.
CAST returns its first parameter (source_expression) as the data-type specified by its second parameter (DataType). In all cases, if the source expression is NULL, the result is NULL. If the evaluated source expression is not compatible with the target data-type, or if the source expression is of the wrong format, a runtime error is generated.
The CCSID clause is used only for
conversions to or from one of the string data-types. It allows you to specify
the code page of the source or target string.
The CCSID expression
can be any expression evaluating to a value of type INT. It is interpreted
according to normal WebSphere
Business Integration Message Broker rules for CCSIDs. See Supported code pages for a list of valid
values.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ak05610_ |