plsql-cop-cli icon indicating copy to clipboard operation
plsql-cop-cli copied to clipboard

Parse error when using unicode literal

Open PhilippSalvisberg opened this issue 1 year ago • 0 comments

Here's an example:

select 'hello' || u'\000a' ||'world' as hello_world from dual;

which produces this result:

HELLO_WORLD
-----------
hello
world

This syntax is not documented in the SQL Language Reference 23ai. However, it is mentioned in Oracle Database Globalization Support Guide for Oracle Database 23ai in another context.

The workaround is to use chr(10) or a string containing the new line character.

PhilippSalvisberg avatar Aug 08 '24 14:08 PhilippSalvisberg