2

I'm running the following sql query in my Oracle Apex application:

SELECT column1 || chr(13) || chr(10) || column2 FROM table;

I want the second column to be displayed on a new line. This doesn't seems to be working in my Apex application. However it's working on SQL*PLUS.

Any ideas what could be the problem here and how can I fix it?

Snow Leopard
  • 347
  • 3
  • 7
  • 18

1 Answers1

3

What you can do is change the display type of the the column to "Standard Report Column" and change your query to

SELECT column 1 || '<br/>' || column2 FROM table;

However, you'll have to be sure that your data won't contain valid HTML or characters, because things like &gt; would convert to >

  • Can anyone tell me what if i had to do the same thing but on the SQL command window instead of apex report? – Snow Leopard Aug 28 '12 at 09:34
  • As far as I know this isn't possible. The command window sends the query straight to the SQL Engine, which doesn't know how to interpret a new line character. If this is just for testing purposes, you might be better off doing this in SQL+. – jonathan.meesschaert Aug 30 '12 at 21:28