STRING_ESCAPE
Description
Escapes special characters in texts and returns text with escaped characters. (STRING_ESCAPE in Transact-SQL).
Sample Source Pattern
Syntax
STRING_ESCAPE( text, type )Arguments
text: Text to escape characters.
type: Format type to escape characters. Currently, JSON is the only format supported.
Return Type
VARCHAR.
Examples
SELECT STRING_ESCAPE('\ / \\ " ', 'json') AS [ESCAPE]; ESCAPE|
--------------------------+
\\ \/ \\\\ \" | Last updated