Wednesday, January 27, 2016

HOW TO TAKE OUTPUT IN EXCEL FORMAT

-bash-3.2$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 27 01:23:09 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> set markup html on;
SQL> conn apps/apps
<br>
Connected.
<br>
SQL&gt; spool invalids.xls
<br>
SQL&gt; select * from dba_objects where status='INVALID';
<br>
<p>
<table border='1' width='90%' align='center' summary='Script output'>
<tr>
<th scope="col">
ENTITY_ID
</th>
<th scope="col">
</table>
<p>

SQL&gt; spool off
<br>
SQL&gt; set markup html off;
<br>

No comments:

Post a Comment