SET ECHO OFF does not work [message #359641] |
Mon, 17 November 2008 15:40 |
clocke
Messages: 2 Registered: November 2008
|
Junior Member |
|
|
I have an SQL file called html.sql that contains the following code.
set markup HTML ON HEAD " -
<title>SQL*Plus Report</title>" -
BODY "" -
TABLE "border='1' align='center' summary='Script output'" -
SPOOL ON ENTMAP ON PREFORMAT OFF
SET ECHO OFF
SET TERM OFF
SET HEADING ON
spool C:\FolderName\FileName.html
/
spool off
set markup html off spool off
host start C:\FolderName\FileName.html
SET TERM ON
I run a query in SQL Plus, and then I enter @html, which creates an HTML page that contains the query results. However, the page shows the query text above the HTML output, which I thought would not happen if I included SET ECHO OFF as I have done above. This is my first time using SQL Plus, so I am probably missing something obvious. Could somebody please tell me what I need to alter in the above code to prevent the query text from being included on the HTML page?
|
|
|
|
Re: SET ECHO OFF does not work [message #359706 is a reply to message #359668] |
Tue, 18 November 2008 01:02 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
Ah, the main difference between your testcase and the testcase the original poster describes is that you include your query in the script.
The original poster enters the sql manually and has just slash in his script, in order to execute it.
Although, when I test it, it has the same effect as yours: the query is NOT included in the spoolfile
[Updated on: Tue, 18 November 2008 01:04] Report message to a moderator
|
|
|
|
Re: SET ECHO OFF does not work [message #359876 is a reply to message #359641] |
Tue, 18 November 2008 07:33 |
clocke
Messages: 2 Registered: November 2008
|
Junior Member |
|
|
Sorry, I knew that it was going to be due to me being an idiot. I had copied the HTML code from a website, in which there was a 1 on the line before the slash. As I copied the code onto this site I removed the 1 as I thought that it looked to be unnecessary, and when I eventually ran the code again the query text disappeared.
Thanks for your help. I apologise for having wasted everybody's time.
|
|
|
|