Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

carriage return or line feed in sql

anand_gpJan 10 2019 — edited Jan 11 2019

Hi,

I am doing something like below in report query -

SELECT

.....,

CASE WHEN branch_name is NOT NULL THEN

   'Branch: ' || branch_name  || CHR(10) || CHR(13)

END

||

remarks  DESCRIPTION,

<other columns here>

FROM <table_name>

And using that #DESCRIPTION# in custom row template and expecting a new line before content of REMARKS column is printed.  However, they are appearing together in the printed output.

For example, if I use  

<td> #BRANCH_NAME# <br> #REMARKS#

separately in report template itself I get carriage return (obviously).  But, my requirement is, show  "Branch: " || BRANCH_NAME  only when it has value.  So, I am putting it in SQL and merging to single field  DESCRIPTION.

Can someone help me to get result something below -

Branch:  FOX TOWN

GET THE CONSIGNMENT READY BY 11 AM

What I am getting right now is -

Branch:  FOX TOWN  GET THE CONSIGNMENT READY BY 11 AM

Thanks,

-Anand

This post has been answered by Billy Verreynne on Jan 11 2019
Jump to Answer
Comments
Post Details
Added on Jan 10 2019
2 comments
668 views