在日常的生產中,可能同一支report對很多人都是需要的,如果同時有很多人查詢同樣的報表會對系統性能有一定的影響,這樣我們可以用sql*plus來定時生成靜態的html實現相關的需求 可以參考相關網頁
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 " Emp Name Salary
col salary format $999,999 heading "
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.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29987/viewspace-51673/,如需转载,请注明出处,否则将追究法律责任。