Skip to main content

Posts

Showing posts with the label NCHAR

SQL Buil-In Functions, String Functions,NCHAR

Returns the Unicode character with the specified integer code, as defined by the Unicode standard Syntax NCHAR ( integer_expression )   Arguments integer_expression Is a positive whole number from 0 through 65535. If a value outside this range is specified, NULL is returned.   Return Types nchar Examples A. Using NCHAR and UNICODE The following example uses the UNICODE and NCHAR functions to print the UNICODE value and the NCHAR (Unicode character) of the second character of the København character string, and to print the actual second character, ø .  DECLARE @nstring nchar(8) SET @nstring = N'København' SELECT UNICODE(SUBSTRING(@nstring, 2, 1)),    NCHAR(UNICODE(SUBSTRING(@nstring, 2, 1))) GO Here is the result set.  ----------- - 248         ø(1 row(s) affected) B. Using SUBSTRING, UNICODE, CONVERT, and NCHAR   The following example uses the ...