Created
March 18, 2017 14:18
-
-
Save mortenbra/3204a125e3da1008e19b36bf94586950 to your computer and use it in GitHub Desktop.
Show errors from user_errors, formatted for easy parsing
This file contains 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 9999 | |
set linesize 9999 | |
set heading off | |
set trim on | |
select lower(attribute) -- error or warning | |
|| ' ' | |
|| line || '/' || position -- line and column | |
|| ' ' | |
|| lower(name) -- file name | |
|| case -- file extension | |
when type = 'PACKAGE' then '.pks' | |
when type = 'PACKAGE BODY' then '.pkb' | |
else '.sql' | |
end | |
|| ' ' | |
|| replace(text, chr(10), ' ') -- remove line breaks from error text | |
as user_errors | |
from user_errors | |
where attribute in ('ERROR', 'WARNING') | |
order by type, name, line, position; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment