Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 我如何插入一个“;“不可打印”;SQL Server中字符串中的空格_Sql Server_Join_Non Printing Characters - Fatal编程技术网

Sql server 我如何插入一个“;“不可打印”;SQL Server中字符串中的空格

Sql server 我如何插入一个“;“不可打印”;SQL Server中字符串中的空格,sql-server,join,non-printing-characters,Sql Server,Join,Non Printing Characters,如何在字符串中插入不可打印的单字符空格?我需要确保以下连接不会返回任何结果。如果此联接返回匹配项,则为假阳性 DECLARE @table1 TABLE (Title VARCHAR(20)) INSERT INTO @table1 (Title) VALUES ('EhghjgVjhjP') -- Title - varchar(20) DECLARE @Table2 TABLE (Keyword VARCHAR(50)) INSERT INTO @Table2 (Keyword) VA

如何在字符串中插入不可打印的单字符空格?我需要确保以下连接不会返回任何结果。如果此联接返回匹配项,则为假阳性

DECLARE @table1 TABLE (Title VARCHAR(20))

INSERT INTO @table1 (Title)
VALUES ('EhghjgVjhjP') -- Title - varchar(20)

DECLARE @Table2 TABLE (Keyword VARCHAR(50))

INSERT INTO @Table2 (Keyword)
VALUES ('E V P') -- Keyword - varchar(20)

SELECT B.Keyword
FROM @table1 A 
INNER JOIN @Table2 B ON A.Title LIKE '%' + REPLACE(B.Keyword, ' ', '%') + '%'

可能是通过使用
char
函数。谢谢@DaleK。我以前不知道这个函数。我看到CHAR(32)如我所愿插入一个空格。