Converts character data from any supported character set into the CHAR character set for the database.
TO_CHAR( string-expression [, source-charset-name ] )
string-expression The string to be converted.
source-charset-name The character set of the string.
LONG VARCHAR
If source-charset-name is specified, then this function is equivalent to:
CAST( CSCONVERT( CAST( string-expression AS BINARY ), 'db_charset', source-charset-name ) AS CHAR ); |
For more information about db_charset, see CSCONVERT function [String].
If source-charset-name is not specified, then this function is equivalent to:
CAST( string-expression AS CHAR ); |
SQL/2003 Vendor extension.
If you have a BINARY value containing data in the cp850 character set, the following statement converts the data to the CHAR character set and data type:
SELECT TO_CHAR( 'cp850_data', 'cp850' ); |
Discuss this page in DocCommentXchange. Send feedback about this page using email. |
Copyright © 2009, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.1 |