SQL PLUS set echo off command [message #418628] |
Mon, 17 August 2009 21:33 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
me_arindam
Messages: 26 Registered: March 2008 Location: India
|
Junior Member |
|
|
Hi,
My question is very simple.
In my SQL script I am using SET ECHO OFF command to suppress the SQL queries and to get the output only.
Like below:
SQL> set echo off
SQL> set markup html on
SQL> spool on
<br>
SQL> spool test.html
<br>
SQL> select cm_name from cm_details where cm_id in (904,707);
<br>
<p>
<table WIDTH='90%' BORDER='5'>
<tr>
<th scope="col">
CM_NAME
</th>
</tr>
<tr>
<td>
Tek Conversion
</td>
</tr>
<tr>
<td>
Rec SAM
</td>
</tr>
</table>
<p>
SQL> spool off
<br>
SQL> set markup html off
<br>
SQL>
But the HTML file which is being generated is having both. The SQL query as well as the output. I want to get the output only.
Please help.
|
|
|
|
|
|
|
Re: SQL PLUS set echo off command [message #418646 is a reply to message #418628] |
Tue, 18 August 2009 00:01 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
SET ECHO OFF only applies to command inside a script not to interactive command.
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.
Regards
Michel
|
|
|