Code Listing 1: Package installation script generator

 1  SELECT    1 ord, 'PROMPT Compiling types package specification for "'
 2         || object_name
 3         || '"...'
 4         || CHR (10)
 5         || '@@'
 6         || object_name || '_tp.pks'
 7      || CHR(10)
 8      || 'SHOW ERRORS' line
 9    FROM all_objects
10   WHERE owner = '&install_owner'
11     AND object_name LIKE '&obj_wildcard' || '%'
12     AND object_type IN ('TABLE')
13  UNION
14  SELECT    2 ord, 'PROMPT Compiling query package specification for "'
15         || object_name
16         || '"...'
17         || CHR (10)
18         || '@@'
19         || object_name || '_qp.pks'
20      || CHR(10)
21      || 'SHOW ERRORS' line
22    FROM all_objects
23   WHERE owner = '&install_owner'
24     AND object_name LIKE '&obj_wildcard' || '%'
25     AND object_type IN ('TABLE')
26  UNION
27  SELECT    3 ord, 'PROMPT Compiling change package specification for "'
28         || object_name
29         || '"...'
30         || CHR (10)
31         || '@@'
32         || object_name || '_cp.pks'
33      || CHR(10)
34      || 'SHOW ERRORS' line
35    FROM all_objects
36   WHERE owner = '&install_owner'
37     AND object_name LIKE '&obj_wildcard' || '%'
38     AND object_type IN ('TABLE')
39  UNION
40  SELECT    4 ord, 'PROMPT Compiling "extra" package specification for "'
41         || object_name
42         || '"...'
43         || CHR (10)
44         || '@@'
45         || object_name || '_cp.pks'
46      || CHR(10)
47      || 'SHOW ERRORS' line
48    FROM all_objects
49   WHERE owner = '&install_owner'
50     AND object_name LIKE '&obj_wildcard' || '%'
51     AND object_type IN ('TABLE')
52  UNION
53  SELECT    5 ord, 'PROMPT Compiling query package body for "'
54         || object_name
55         || '"...'
56         || CHR (10)
57         || '@@'
58         || object_name || '_qp.pkb'
59      || CHR(10)
60      || 'SHOW ERRORS' line
61    FROM all_objects
62   WHERE owner = '&install_owner'
63     AND object_name LIKE '&obj_wildcard' || '%'
64     AND object_type IN ('TABLE')
65  UNION
66  SELECT    6 ord, 'PROMPT Compiling change package body for "'
67         || object_name
68         || '"...'
69         || CHR (10)
70         || '@@'
71         || object_name || '_cp.pkb'
72      || CHR(10)
73      || 'SHOW ERRORS' line
74    FROM all_objects
75   WHERE owner = '&install_owner'
76     AND object_name LIKE '&obj_wildcard' || '%'
77     AND object_type IN ('TABLE')
78  UNION
79  SELECT    7 ord, 'PROMPT Compiling "extra" package body for "'
80         || object_name
81         || '"...'
82         || CHR (10)
83         || '@@'
84         || object_name || '_xp.pkb'
85      || CHR(10)
86      || 'SHOW ERRORS' line
87    FROM all_objects
88   WHERE owner = '&install_owner'
89     AND object_name LIKE '&obj_wildcard' || '%'
90*    AND object_type IN ('TABLE');