Добро пожаловать в форум, Guest  >>   Войти | Регистрация | Поиск | Правила | В избранное | Подписаться
Все форумы / Microsoft SQL Server Новый топик    Ответить
 Можно ли в SQL Server запросом получить такую таблицу символов?  [new]
Ролг Хупин
Member

Откуда: Чебаркуль
Сообщений: 3466
или надо руками наколотить?

https://www.safaribooksonline.com/library/view/rtf-pocket-guide/9781449302047/ch04.html

ASCII-RTF Character Chart
Table 4-1 shows the main printable characters you can access in RTF, as defined by the ANSI character set (also known as Code Page 1252, which is basically Latin-1 with some characters added between 128 and 159). Accessing Unicode characters is explained in the Character Formatting section of Chapter 1.

Note that while RTF escapes (\'xx) are valid for all characters, the only characters that have to be escaped are these three characters: {, }, and \, plus all the characters over code 127.
17 апр 18, 11:43    [21344816]     Ответить | Цитировать Сообщить модератору
 Re: Можно ли в SQL Server запросом получить такую таблицу символов?  [new]
Ролг Хупин
Member

Откуда: Чебаркуль
Сообщений: 3466
Нашел такое, но там есть дырки

You can materialize a table with the ASCII codes or create one dynamically in a query. But be aware that only the code points 0-127 are ASCII characters. Characters in the range 128-255 are determined by the character code page (collation in SQL Server):

WITH 
	t4 AS (SELECT n FROM (VALUES(0),(0),(0),(0)) t(n))
	,t256 AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 0)) - 1 AS id FROM t4 AS a CROSS JOIN t4 AS b CROSS JOIN t4 AS c CROSS JOIN t4 AS d)
SELECT 
	id
	, CHAR(id) COLLATE SQL_Latin1_General_CP1_CI_AS AS CP1252_Char
	, CHAR(id) COLLATE SQL_Latin1_General_CP437_CI_AS AS CP437_Char
FROM t256;
17 апр 18, 11:54    [21344844]     Ответить | Цитировать Сообщить модератору
Все форумы / Microsoft SQL Server Ответить