Monday, July 21, 2008

How to create HTML with SQL*Plus

This article gives an overview about the possibilities of creating HTML. It is easy to migrate scripts from CHARACTER mode to HTML, because all of the SQL*Plus tags are converted to HTML tags without any code-change, like TTITLE, BTITLE.

For example,
sql>set markup html on spool on
sql>spool test.html
//QUERY
sql>spool off
sql>set markup html off spool off

Change the background to black and print your Text in Pink:
set markup html on spool on HEAD ' Forth Test SQL*Plus and HTML ' Body 'TEXT=hotpink bgcolor=black'
spool c:\ex4.html

TTITLE CENTER 'All rows from Dept' Skip 1 Left 'Left arranged' Right 'right arranged' Skip 3
BTITLE CENTER 'End of report' Skip 3
select * from dept;
spool off
set markup html off spool off




No comments:

search engine

Custom Search