Created
October 6, 2016 16:48
-
-
Save dotmaik1/1cdafbf9bed5d25684172805bc7cee41 to your computer and use it in GitHub Desktop.
Spool to excel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SET PAGESIZE 50000 | |
| SET FEEDBACK OFF | |
| SET MARKUP HTML ON SPOOL ON | |
| SET NUM 24 | |
| SPOOL PROD_PAPERLESS_SEGMENT_ADVISOR.xls | |
| -- Display the findings. | |
| SET LINESIZE 250 | |
| COLUMN task_name FORMAT A20 | |
| COLUMN object_type FORMAT A20 | |
| COLUMN schema FORMAT A20 | |
| COLUMN object_name FORMAT A30 | |
| COLUMN object_name FORMAT A30 | |
| COLUMN message FORMAT A40 | |
| COLUMN more_info FORMAT A40 | |
| SELECT f.task_name, | |
| f.impact, | |
| o.type AS object_type, | |
| o.attr1 AS schema, | |
| o.attr2 AS object_name, | |
| f.message, | |
| f.more_info | |
| FROM dba_advisor_findings f | |
| JOIN dba_advisor_objects o ON f.object_id = o.object_id AND f.task_name = o.task_name | |
| WHERE f.task_name IN ('PAPERLESS_SEGMENT_ADVISOR') | |
| ORDER BY f.task_name, f.impact DESC; | |
| SPOOL OFF | |
| SET MARKUP HTML OFF SPOOL OFF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment