In Oracle there is a super-easy way to make your output display in
HTML format.
This is a great tool for web-based
ad-hoc query tools and you can collect input from the end-users, spool
a query to SQL*Plus and then return the data as an HTML page.
For example, let's assume that your
Web Form does an employee report of employee name and salary and you
want to return the output as an HTML file, ready to include in the
returning HTML response.
set termout off
set pages 999
SET MARKUP HTML ON TABLE "class=emp cellspacing=0" ENTMAP OFF
col emp_name format a30 heading
"<p class=left>Emp Name</p>"
col salary format $999,999 heading "<p
class=left>Salary</p>"
spool my_html.htm
select
emp_name,
salary
from
emp e;
spool off;
This will spool the HTML to the
my_html.htm file, ready for you to return to the client.
For working 10g scripts, I got Mike
Ault’s latest book “Oracle10g New Features”. You can buy it directly
from the publisher (30% off) and get immediate downloads of Mike’s
working Oracle10g scripts:
http://www.rampant-books.com/book_2003_2_oracle10g.htm