2 Replies Latest reply on Jan 11, 2019 6:31 AM by anand_gp

    carriage return or line feed in sql

    anand_gp

      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