SELECT /*+ RULE */ '',
       b.owner,
       decode (b.object_type, 'PACKAGE', CONCAT( CONCAT (b.object_name, '.'), a.object_name),b.object_name),
       NULL, NULL, NULL, NULL,
       decode (b.object_type, 'PACKAGE', decode(a.position, 0, 2, 1, 1, 0),
       decode(b.object_type, 'PROCEDURE', 1, 'FUNCTION', 2, 0))
       FROM ALL_ARGUMENTS a,
       ALL_OBJECTS b
       WHERE ( b.object_type = 'PROCEDURE'
          OR b.object_type = 'FUNCTION'
          OR b.object_type = 'PACKAGE' )
         AND b.object_id = a.object_id
         AND (a.sequence=1 OR a.sequence=0)
         AND b.OBJECT_NAME LIKE '%' ESCAPE '\'
 UNION
SELECT /*+ RULE */ '',
       b.owner,
       b.object_name,NULL, NULL, NULL, NULL,
       decode(b.object_type, 'PROCEDURE', 1, 'FUNCTION', 2, 0)
  FROM ALL_OBJECTS b
 WHERE (b.object_type = 'PROCEDURE' OR b.object_type = 'FUNCTION')
 UNION
SELECT /*+ RULE */ distinct '',
       a.owner,
       CONCAT(CONCAT (a.package_name, '.'), a.object_name),NULL, NULL, NULL, NULL,
       decode(a.position, 0, 2, 1, 1, 0)
       FROM ALL_ARGUMENTS a
       WHERE (a.sequence=1 OR a.sequence=0)
       AND a.PACKAGE_NAME LIKE '%' ESCAPE '\'
ORDER BY 2,3
