12
返回列表 发新帖
楼主: Fenng

[精华] 用Oracle的SQL工具创建HTML页面(原)

[复制链接]
论坛徽章:
3
2011新春纪念徽章
日期:2011-01-04 10:37:10
11#
发表于 2003-5-28 08:29 | 只看该作者

Document...

orasnap_for_cdoug.ppt

157.5 KB, 下载次数: 279

使用道具 举报

回复
论坛徽章:
0
12#
发表于 2003-5-28 09:41 | 只看该作者
不错,是不是底版本的也可以呢

使用道具 举报

回复
论坛徽章:
1
授权会员
日期:2005-10-30 17:05:33
13#
发表于 2003-5-28 10:17 | 只看该作者
其實大家可以試試owa_util 這個package就可以直接做到了!特別是在isqlplus 而且也可以利用在
Oracle的psp(PL/SQL Server Pages )很好用的。
ex :
begin
dummy boolean;
being
dummy:=owa_util.tableprint('employee','border');
end;
/
然後再利用owa_util.showpage()印出來就可以了!

使用道具 举报

回复
论坛徽章:
2
ITPUB元老
日期:2005-02-28 12:57:00授权会员
日期:2005-10-30 17:05:33
14#
发表于 2003-5-29 10:07 | 只看该作者
這是我在一個國外的網站上看到的
大家可以參考參考

SQL*Plus is primarily a character mode terminal application. However, since version 8.1.6, SQL*Plus has the ability to format its output in HTML format. To enable HTML output, use the command:

SQL> set markup html on

After it's turned on, several characters, such as >, <, and & are automatically changed to HTML entities. You can disable this feature by adding the option ENTMAP OFF.

SQL&gt; set markup html entmap off;
SQL>

When you issue a query, the results will be generated as an HTML TABLE, TR, and TD instead of as the usual formatted ASCII output:

SQL> select sysdate from dual;
<br>
<p>
<table border="1" width="90%">
<tr>
<th>
SYSDATE
</th>
</tr>
<tr>
<td>
30-MAR-03
</td>
</tr>
</table>
<p>

If you want to see the results as a preformatted HTML PRE element, use the option PREFORMAT ON:

SQL> set markup html preformat on;
SQL> select sysdate from dual;
<br>
<pre>

SYSDATE
---------
30-MAR-03
</pre>

If you specify SPOOL ON, SQL*Plus will generate headers to the spool file when you issue the SPOOL command.

You can change the HEAD tag contents, BODY tag, and TABLE tag attributes in the output by specifying those tag names as options:

SQL> set markup html head '<style type="text/css">body {background: white}</style>' -
> body 'bgcolor="#FFFFFF"' -
> table 'width="100%" border=0'
SQL> select sysdate from dual;
<br>
<p>
<table width="100%" border=0>
<tr>
<th>
SYSDATE
</th>
</tr>
<tr>
<td>
30-MAR-03
</td>
</tr>
</table>
<p>

With MARKUP HTML ON enabled, the PAGESIZE, LINESIZE, TTITLE, BTITLE, and COLUMN commands are reflected in the HTML output.

You can enable MARKUP HTML commands and options from the command line, like this:

REM -- report.sql
select * from emp order by empno;
exit;

sqlplus -s -m "html on" scott/tiger @report > report.html

Using this method, you can run an old character mode SQL*Plus report and generate HTML without modifying the script.

使用道具 举报

回复
论坛徽章:
60
2007年度最佳版主
日期:2008-04-03 16:46:15现任管理团队成员
日期:2011-05-07 01:45:08双黄蛋
日期:2011-06-15 17:03:34ITPUB十周年纪念徽章
日期:2011-11-01 16:19:412012新春纪念徽章
日期:2012-01-04 11:49:542012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
15#
 楼主| 发表于 2003-5-29 12:25 | 只看该作者
最初由 piner 发布
[B]fenng在csdn上的id是什么?常去哪里啊? [/B]


ID:Fenng

我倒是也常看见你

使用道具 举报

回复
论坛徽章:
0
16#
发表于 2007-11-28 09:56 | 只看该作者
很不错的知识啊,又学了一点,多谢楼主~!!

使用道具 举报

回复
论坛徽章:
0
17#
发表于 2008-6-23 13:39 | 只看该作者
好东西

使用道具 举报

回复
论坛徽章:
26
2010年世界杯参赛球队:葡萄牙
日期:2012-09-20 14:59:08密尔沃基雄鹿
日期:2012-03-20 16:57:19海蓝宝石
日期:2012-07-26 23:23:38奥运会纪念徽章:乒乓球
日期:2012-09-07 16:24:16奥运会纪念徽章:足球
日期:2012-09-07 16:24:16马上有房
日期:2014-02-18 16:42:022014年新春福章
日期:2014-02-18 16:42:022013年新春福章
日期:2013-02-25 14:51:24灰彻蛋
日期:2012-12-31 12:03:56蜘蛛蛋
日期:2012-11-29 17:20:08
18#
发表于 2008-10-22 19:39 | 只看该作者
用Oracle的SQL*Plus工具创建HTML页面

使用道具 举报

回复
论坛徽章:
14
授权会员
日期:2007-10-28 17:13:06祖国60周年纪念徽章
日期:2009-10-09 08:28:00生肖徽章2007版:羊
日期:2009-09-10 11:27:42生肖徽章2007版:鼠
日期:2009-03-10 21:32:40生肖徽章2007版:马
日期:2009-03-10 21:28:53生肖徽章2007版:牛
日期:2009-03-10 21:19:32生肖徽章2007版:羊
日期:2009-03-10 21:16:04奥运会纪念徽章:铁人三项
日期:2008-10-24 13:27:21生肖徽章2007版:鸡
日期:2008-10-18 21:30:18数据库板块每日发贴之星
日期:2008-10-13 01:02:26
19#
发表于 2008-10-22 20:07 | 只看该作者
用SQL*Plus生成数据库的性能分析报告为html格式,谢谢

使用道具 举报

回复
论坛徽章:
0
20#
发表于 2008-12-4 14:43 | 只看该作者
相当实用的东东

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表