I am looking for something that works in SQL Server similar to the @ symbol in c# which causes a string to be taken as it\'s literal. Eg:
@
strin
From the docs:
Syntax match_expression [ NOT ] LIKE pattern [ ESCAPE escape_character ]
Syntax
match_expression [ NOT ] LIKE pattern [ ESCAPE escape_character ]
Use the ESCAPE option like so:
ESCAPE
SELECT [Name] FROM [Test] WHERE [Name] LIKE (REPLACE(@searchText, '%', '%%') + '%') ESCAPE '%'