Tag Info

New answers tagged

0

@gbn has already explained using NVARCHAR, that it holds UCS-2 characters, and COLLATE. But there were two follow-up questions: select statement to list the records in order of below. 1. Arabic, 2. Hebrew 3. English and: can you tell any way to filter only Arabic records or only Hebrew? Yes, it is possible to accomplish both of these. No, it ...


1

CHAR(0) appears to be converted to a space, or CHAR(32). The following demonstrates the problem: DECLARE @Data NVARCHAR(255); SELECT @Data = 'this is a test' + CHAR(0) + 'of null'; DECLARE @i INT; SET @i = 1; DECLARE @txt NVARCHAR(255); WHILE @i < LEN(@Data) BEGIN IF SUBSTRING(@Data, @i, 1) = CHAR(0) BEGIN SET @txt = 'found a null char ...



Top 50 recent answers are included