UNISTR_QUOTE

Interprets escape sequences in a string and then quotes it.

This function is a combination of UNISTR and QUOTE. It first processes the input string X by interpreting \XXXX escape sequences, converting them into their corresponding Unicode characters. After this conversion, it then applies the QUOTE function to the resulting string.

The QUOTE part wraps the string in single quotes and escapes any internal single quotes, making it suitable for inclusion as a string literal in an SQL statement.

Example

// If a column contains the string "Hello \0027 World", where \0027 is a single quote:
// UNISTR_QUOTE would first convert it to "Hello ' World".
// Then, QUOTE would transform it into "'Hello '' World'".
val processedAndQuoted = select(UNISTR_QUOTE(MyTable.myColumn))

Return

A KQLiteColumn of type String containing the processed and quoted string.

Author

MOHAMMAD AZIM ANSARI

Parameters

column

The column or string value containing potential \XXXX escape sequences to be processed and quoted.

See also