SELECT to_char(a.LINE) || ' - ' || a.TEXT ERROR FROM ALL_SOURCE a, ALL_ERRORS b WHERE a.NAME = 'object_name' AND a.NAME = b.NAME AND a.TYPE = b.TYPE AND a.LINE = b.LINE ORDER BY a.NAME, a.LINE;