Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Hei
> -----Original Message-----
> From: Raymond Lee Meng Hong [mailto:RAYMOND_at_infopro.com.my]
>
> I'm running Oracle 8.1.6. and using Sqlplus 3.2.2.
The SET command is a SQL*Plus command, so options on the SET command will only be valid for the corresponding value of SQL*Plus in which the feature was implemented.
SET MARKUP HTML was implemented in SQL*Plus 8.1.6.
Below is the extract from the manual describing the feature. (long)
MARK[UP] HTML [ON|OFF] [HEAD text] [BODY text] [ENTMAP {ON|OFF}] [SPOOL {ON|OFF}] [PRE[FORMAT] {ON|OFF}] Outputs HTML marked up text. SET MARKUP has the same options and behavior as SQLPLUS -MARKUP and supports HTML 3.2.
The mandatory argument HTML specifies that the type of output generated by MARKUP is HTML. The optional HTML arguments, ON and OFF, specify whether or not to generate HTML output. SET MARKUP HTML ON generates HTML output using the specified MARKUP options, or options set by previous SET MARKUP HTML commands.
You can turn HTML output ON and OFF as required during a session. The default is OFF.
The HEAD text option allows you to specify content for the <HEAD> tag. By default, text is '<TITLE>SQL*Plus Report</TITLE>'. If you enter more than one word in text, it must be enclosed in quotes. text must be valid HTML for the <HEAD> tag. SQL*Plus does not verify this free text entry. It is your responsibility to ensure that the text you enter is valid HTML.
The BODY text option allows you to specify attributes for the <BODY> tag. By default, there are no attributes. If you enter more than one word in text, it must be enclosed in quotes. text must be valid HTML for the <HEAD> tag. SQL*Plus does not verify this free text entry. It is your responsibility to ensure that the text you enter is valid HTML.
SPOOL ON or OFF specifies whether or not SQL*Plus writes HTML tags to the start and end of each file created by the SQL*Plus SPOOL command.
You can turn SPOOL ON and OFF as required during a session. The default is OFF.
The SET MARKUP HTML SPOOL ON option enables the writing of HTML tags to the spool file. The spool file is not created, and the tags enabled by the SET MARKUP HTML SPOOL ON option are not written to the spool file until you issue the SQLPLUS SPOOL filename command.
SQL*Plus writes several HTML tags to the spool file with default content, when you issue the SQL*Plus SPOOL command:
<HTML> <HEAD> <TITLE>SQL*Plus Report</TITLE> <META name="generator" content="SQL*Plus 8.1.6"> </HEAD> <BODY> <PRE>
When you issue the SQL*Plus SPOOL OFF command, SQL*Plus appends the following end tags and then closes the file:
</PRE></BODY></HTML>
ENTMAP ON or OFF specifies whether or not SQL*Plus displays the special characters "<", ">" and "&" as the HTML entities <, > and & respectively.
You can turn ENTMAP ON and OFF as required during a session. The default is ON. For example, with ENTMAP OFF, SQL*Plus screen output would be:
SQL> SELECT ENAME, EMPNO 2 FROM EMP 3 WHERE SAL <= 2000;
With ENTMAP ON, SQL*Plus screen output would be:
SQL> SELECT ENAME, EMPNO 2 FROM EMP 3 WHERE SAL <= 2000; --------------------------------------------------------------------------------Note:
You can turn PREFORMAT ON and OFF as required during a session. The default is OFF.
If you want to write scripts that will always generate output inside a <PRE> tag, you should use the PREFORMAT ON option of the SET MARKUP HTML command to ensure future compatibility. For example:
SET MARKUP HTML ON PREFORMAT ON
Received on Fri May 18 2001 - 21:19:25 CDT
![]() |
![]() |