Saturday, June 20, 2020


SQL*Plus Web Reports


The following example displays the contents of the SCOTT.EMP table as a HTML table.
SET ECHO OFF
SET MARKUP HTML ON SPOOL ON
SPOOL emp1.html
SELECT * FROM emp;
SPOOL OFF
SET MARKUP HTML OFF
SET ECHO ON
If this code is run from within a SQL*Plus session the resulting HTML file will look like this: emp1.html.
Alternatively, the script can saved as EmpHTMLReport.sql and run from the command line.
sqlplus scott/tiger@w2k1 @EmpHTMLReport.sql
The resulting HTML file will look like this: emp2.html.
Alternatively, an individual query can be saved to EmpSQL.sql and run with the appropriate command line parameters.
sqlplus -S -M "HTML ON" scott/tiger@w2k1 @EmpSQL.sql>emp3.html
The resulting HTML file will look like this: emp3.html.

No comments:

Post a Comment

  RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time https://shivanandarao-oracle.com/2012/12/05/rman-20207-until-time-or-re...