On the move:

I'm currently moving the following to their own blogs: Unix, HTML for Blogs, Perl & Java.
The links are on the left side.

Tuesday, September 30, 2008

HTML Formatting


--+-----------------------------------------------------------------------------
--| Set Escape On To Use \&nbsp; (space) \&amp; (&) \&gt; (>) \&lt; (<)
--+-----------------------------------------------------------------------------

Set Markup Html On Entmap On Spool On Preformat Off
Set Feedback Off Term Off Echo Off Verify Off Linesize 2000 Escape On

--+-----------------------------------------------------------------------------
--| Define 's' to be a lot of spaces (makes the heading easier to read
--+-----------------------------------------------------------------------------

Define Xprogram = Html1.Sql
Define s = "\&nbsp; \&nbsp; \&nbsp; \&nbsp; \&nbsp; \&nbsp; \&nbsp; \&nbsp; \&nbsp; \&nbsp;"
Spool Emp.Htm

--+-----------------------------------------------------------------------------
--| Print the title (Entmap says: Dont Translate '<' Etc )
--+-----------------------------------------------------------------------------

Column Title1 Entmap Off Format A2000 Heading "<h1><i>HTML Test</i></h1>"

Select 'Program: <B>&xProgram</B> &s'
||To_Char(Sysdate,'FmMonth Dd, Yyyy Day')||To_Char(Sysdate,' Hh24:Mi')
||'&s User: <B>' || User || ' </b>'
As Title1
From V$Database;

--+-----------------------------------------------------------------------------
--| Print the actual report
--+-----------------------------------------------------------------------------
Column Job Entmap Off
Column Ename Entmap Off

Select Empno,
----------------------------------------
'<Center>'||Ename||'</Center>'
As
Ename,
----------------------------------------
'<Small>'||Job||'</Small>'
As
Job,
----------------------------------------
Mgr, Hiredate, Sal, Comm, Deptno
From Emp;

Spool Off
--+-----------------------------------------------------------------------------
--| clean up
--+-----------------------------------------------------------------------------
Set Markup Html Off Entmap Off Spool On Preformat Off
Set Term On Escape Off

Prompt ** Report Completed. Use Firefox To View Your Output: Emp.Htm **

No comments:

Post a Comment