3 Replies Latest reply on May 7, 2014 4:58 PM by Simon_DBA

    Export to HTML with "preformatted" text??


      Hi there,


      I have a varchar2 column with contains carriage returns.  I want to run my query in SQL Developer and "export" the results to HTML format.  But when I do so, the column data looses things like multiple spaces and the carriage returns.  Hence I essentially want to export the column with the <PRE> ... </PRE> html tags.  Any way to do this from SQL Developer?


      Example table in SQL Plus:

      SQL> create table my_demo (MY_TEXT varchar2(255));
      Table created.
      SQL> insert into my_demo values ('Hello'||CHR(10)||'   World');
      1 row created.
      SQL> select * from my_demo;



      So what I want is the MY_TEXT column in the HTML export file to show the world "Hello" above the indented word "World" just like we see in SQLPlus (obviously my real query is much more complex).  If I try selecting the column with the literal strings '<PRE>' and '</PRE>' around the MY_TEXT column it doesn't work and shows those as string values and not as HTML tags.


      In SQL Plus we can use "COLUMN ... ENTMAP OFF" - but that doesn't work in SQL Developer.  Similarly I don't see how the /*fixed*/ SQL Developer hint will help me.


      Suggestions?  Some option I'm missing maybe?