Let's face it, we all make PL/SQL coding errors. We're dorks.
We also know that "show errors" sucks.
We also know that we can't always get TOAD or SQLDeveloper installed or running to take us through our errors.
But... we're also too lazy to pull apart the Oracle dictionary to give us a decent report. Well, I'm feeling a little less lazy, so here we are:
WITH parms AS
(SELECT &&object_pattern AS obj_pat FROM dual
)
SELECT
SRC_WITH_ERRS.LINE,
SRC_WITH_ERRS.TEXT,
aobj.STATUS,
aobj.LAST_DDL_TIME,
src_with_errs.position,
src_with_errs.sequence
FROM parms,
all_objects aobj,
(SELECT owner,
name,
type,
LINE,
lpad ('--^', position) || '-- ' || text AS text,
position,
sequence
FROM all_errors
UNION ALL
SELECT owner,
name,
type,
LINE,
TEXT ,
0 AS position,
0 AS sequence
FROM all_SOURCE
) SRC_WITH_ERRS
WHERE aobj.OWNER = SRC_WITH_ERRS.OWNER
AND aobj.object_type = src_with_errs.type
AND aobj.object_name = src_with_errs.name
AND aobj.OBJECT_NAME LIKE upper (parms.obj_pat)
ORDER BY aobj.owner,
aobj.object_name,
aobj.object_type,
LINE,
position
|
