Tag Info

New answers tagged


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 ...


consider using the citext data type available in contrib. you don't have to do this upper / lower nightmare anymore. for the regular expression type you can use gist along with gist_trgm_ops. it will boost regular expressions nicely.

Top 50 recent answers are included