Skip to Content
0
May 08, 2020 at 12:41 PM

How can I run a HANA SELECT to DUMMY with special characters?

684 Views

I have a query in HANA which looks this:

SELECT N'111 15 € Gutschein am Tag des Wanderns! ??.msg ACTIVITY' AS "U_ValueOfKeys" FROM DUMMY

which fails with

Syntax error or access violation;257 sql syntax error: incorrect syntax near "111 15 € Gutschein am Tag des Wanderns! ??.msg ACTIVITY": line 9 col 149 (at pos 852)

This runs correctly if the special character is not there. This is input from the user.

What would be the solution or the workaround for this? Any way to escape these special characters?