Discover Unicode Characters Available in SQL Server

The following query will help you look for that obscure report character, or possibly just stir your curiosity as to what is available via TSQL.

SET NOCOUNT ON;
-- table variable to hold results
DECLARE @t TABLE (code_number int,code_character nvarchar(3));
-- variable for numbers to check
DECLARE @i int;
--insert into @t
SET @i = 1;
WHILE @i < 66000
BEGIN
INSERT INTO @t (code_number,code_character)
SELECT @i, nchar(@i);
SET @i = @i + 1;
END
--get the results
SELECT * FROM @t 
WHERE 1=1
AND code_character IS NOT NULL
AND code_character <> '';

image1

Leave a Reply