I have PL/SQL function something like this:
Declare
Qry Varchar2(4000);
Crlf Varchar2(2) := Chr(10) || Chr(13);
-- Crlf Varchar2(1) := Chr(10); Ok too
-- Crlf Varchar2(1) := Chr(13); Ok too
Begin
Qry := 'Select ' || Crlf ||
' EName ' || Crlf ||
' ,DeptNo' || Crlf ||
'From Emp;';
Return Qry;
End;
which is then used for example in APEX as source for PL/SQL Function Body returning SQL Query.
I would like to know if is necessary to use for CrLf character both ASCII codes (10 and 13) or just one of them? Currently look like this approach work in all 3 cases, but maybe somewhere else this could cause hard to find bug.
What is your good practice / suggestions about using such characters if you use such kind of visual formatting for SQL? Thanks for you opinions and answers.
BB