Skip to Main Content

SQL Developer

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!

Export to HTML with "preformatted" text??

Simon_PMay 6 2014 — edited May 7 2014

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;

MY_TEXT
-----------------------------------------------------------------
Hello
   World


SQL> 

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?

Thanks.

This post has been answered by Simon_P on May 7 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 4 2014
Added on May 6 2014
3 comments
2,172 views