DB2 10.5 for Linux, UNIX, and Windows

TO_NCHAR scalar function

The TO_NCHAR function returns a national character representation of an input expression that has been formatted using a character template.

Character to nvarchar

Read syntax diagramSkip visual syntax diagram
>>-TO_NCHAR--(--character-expression---------------------------><

Timestamp to nvarchar

Read syntax diagramSkip visual syntax diagram
>>-TO_NCHAR--(--timestamp-expression--+--------------------------------------+--)-><
                                      '-,--format-string--+----------------+-'      
                                                          '-,--locale-name-'        

Decimal floating-point to nvarchar

Read syntax diagramSkip visual syntax diagram
>>-TO_NCHAR--(--decimal-floating-point-expression--+------------------+--)-><
                                                   '-,--format-string-'      

The schema is SYSIBM.

The TO_NCHAR function can be specified only in a Unicode database (SQLSTATE 560AA).

The TO_NCHAR scalar function is equivalent to invoking the TO_CHAR function and casting its result to NVARCHAR.

For more information about TO_NCHAR refer to VARCHAR_FORMAT.