set scan on select us2.name, us2.type, us2.text FROM dba_source us1, dba_source us2 WHERE us1.owner IN ('MECOMS', 'MECOMS_RTM') AND us1.owner = us2.owner AND upper(us1.TEXT) like '%$LOG%:%' AND us2.name = us1.name AND us2.line = us1.line + 1 AND us2.type = us1.type AND us1.name = '&1' order by us2.name;