[Home] [Help]
PACKAGE BODY: APPS.WF_DDL
Source
1 package body WF_DDL as
2 /* $Header: WFDDLB.pls 115.2 2002/10/28 19:06:19 rwunderl noship $ */
3
4 PROCEDURE DropIndex (IndexName IN VARCHAR2,
5 Owner IN VARCHAR2,
6 IgnoreNotFound IN BOOLEAN ) is
7
8 IndexNotFound EXCEPTION;
9 pragma exception_init(IndexNotFound, -1418);
10
11 BEGIN
12 execute IMMEDIATE 'drop index '||owner||'.'||IndexName;
13
14 EXCEPTION
15 when IndexNotFound then
16 if (IgnoreNotFound) then
17 null;
18
19 else
20 raise;
21
22 end if;
23
24 when OTHERS then
25 WF_CORE.Context('WF_DDL', 'DropIndex', IndexName, Owner);
26 raise;
27
28 end;
29
30 PROCEDURE TruncateTable (TableName IN VARCHAR2,
31 Owner IN VARCHAR2,
32 IgnoreNotFound IN BOOLEAN ) is
33
34 tableNotFound EXCEPTION;
35 pragma exception_init(tableNotFound, -942);
36
37 BEGIN
38 execute IMMEDIATE 'truncate table '||Owner||'.'||TableName;
39
40 EXCEPTION
41 when tableNotFound then
42 if (IgnoreNotFound) then
43 null;
44
45 else
46 raise;
47
48 end if;
49
50 when OTHERS then
51 WF_CORE.Context('WF_DDL', 'TruncateTable', TableName, Owner);
52 raise;
53
54 END;
55
56 end WF_DDL;