Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Functions » Alphabetical list of functions

TO_CHAR function [String] Next Page

TO_NCHAR function [String]


Converts character data from any supported character set into the NCHAR character set.

Syntax

TO_NCHAR( string-expression [, source-charset-name ] )

Parameters

string-expression    The string to be converted

source-charset-name    The character set of the string.

Remarks

If source-charset-name is specified then this function is equivalent to:

CAST( CSCONVERT( CAST( string-expression AS BINARY ),
 'nchar_charset', source-charset-name ) 
 AS NCHAR );

For more information about nchar_charset, see CSCONVERT function [String].

If source-charset-name is not provided then this function is equivalent to:

CAST( string-expression AS NCHAR );
See also
Standards and compatibility
Example

If you have a BINARY value containing data in the cp850 character set, the following example to converts the data to the NCHAR character set and data type:

SELECT TO_NCHAR( 'cp850_data', 'cp850' );