In my PL/SQL procedure I had to add a text including newline (\n in
java, ascii #10) in a text to be read by a java application. Tried with
the code
l_text := 'hello\nworld';
This did not work, the \n character behaves clearly different in PL/SQL than
in Java and only wrote ‘\n’, probably the same as writing a String in
Java using \\n. To add the newline character, I had to use chr(10),
that worked.
l_text := 'hello' || chr(10) || 'world';
I guess the same goes for newline-carriage return as well, in Java \n\r in PL/SQL writes char(10) || chr(13).
















0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment