Hello -
I am writing a procedure that returns a large (clob) of dynamic sql.
To make this readable, I am trying to insert carriage returns and/or line feeds into the text, though they are not working.
Basically, I have a large string with '\n' where I want the carriage returns, then trying to run REPLACE (input_string, '\n', chr(10) ) to create the output, but all this does is remove the '\n' part from the string.
I have also tried chr(13) and chr(13)||chr(10), though to the same effect.
Actually, running the sme as a sql command (in sqldeveloper) does the same:
select REPLACE ('line 1\nline 2' , '\n', chr(10) ) from dual;
line 1line 2
or even simply ...
select 'line 1' || chr(10) || 'line 2' from dual;
line 1line 2
I'm sure this used to work in Oracle - or am I doing something wrong? I am using exadata - does this affect the syntax?
Many thanks!