DBA Data[Home] [Help]

APPS.GMA_PURGE_COPY dependencies on DBMS_SQL

Line 46: l_detailcursor := DBMS_SQL.OPEN_CURSOR;

42:
43: l_transcount := 0; -- Nothin's happened yet.
44:
45: -- we will be reusing these...
46: l_detailcursor := DBMS_SQL.OPEN_CURSOR;
47: g_copycursor := DBMS_SQL.OPEN_CURSOR;
48:
49: -- deal with the tables, starting with the most detail and moving towards
50: -- the document master table

Line 47: g_copycursor := DBMS_SQL.OPEN_CURSOR;

43: l_transcount := 0; -- Nothin's happened yet.
44:
45: -- we will be reusing these...
46: l_detailcursor := DBMS_SQL.OPEN_CURSOR;
47: g_copycursor := DBMS_SQL.OPEN_CURSOR;
48:
49: -- deal with the tables, starting with the most detail and moving towards
50: -- the document master table
51:

Line 83: DBMS_SQL.PARSE(l_detailcursor,l_sqlstatement,DBMS_SQL.NATIVE);

79: ')';
80:
81: GMA_PURGE_UTILITIES.printdebug(p_purge_id,l_sqlstatement,p_debug_flag);
82:
83: DBMS_SQL.PARSE(l_detailcursor,l_sqlstatement,DBMS_SQL.NATIVE);
84: DBMS_SQL.DEFINE_COLUMN_ROWID(l_detailcursor,1,l_detailrowid);
85: l_return := DBMS_SQL.EXECUTE(l_detailcursor);
86:
87: -- The following is long and hard to follow, but runs faster

Line 84: DBMS_SQL.DEFINE_COLUMN_ROWID(l_detailcursor,1,l_detailrowid);

80:
81: GMA_PURGE_UTILITIES.printdebug(p_purge_id,l_sqlstatement,p_debug_flag);
82:
83: DBMS_SQL.PARSE(l_detailcursor,l_sqlstatement,DBMS_SQL.NATIVE);
84: DBMS_SQL.DEFINE_COLUMN_ROWID(l_detailcursor,1,l_detailrowid);
85: l_return := DBMS_SQL.EXECUTE(l_detailcursor);
86:
87: -- The following is long and hard to follow, but runs faster
88: -- than breaking it out into functions. Sorry.

Line 85: l_return := DBMS_SQL.EXECUTE(l_detailcursor);

81: GMA_PURGE_UTILITIES.printdebug(p_purge_id,l_sqlstatement,p_debug_flag);
82:
83: DBMS_SQL.PARSE(l_detailcursor,l_sqlstatement,DBMS_SQL.NATIVE);
84: DBMS_SQL.DEFINE_COLUMN_ROWID(l_detailcursor,1,l_detailrowid);
85: l_return := DBMS_SQL.EXECUTE(l_detailcursor);
86:
87: -- The following is long and hard to follow, but runs faster
88: -- than breaking it out into functions. Sorry.
89:

Line 112: IF DBMS_SQL.FETCH_ROWS(l_detailcursor) <= 0 THEN

108: -- repeat the following for each unique detail row in each detail table
109: LOOP
110:
111: -- get the next value or exit loop if there isn't one
112: IF DBMS_SQL.FETCH_ROWS(l_detailcursor) <= 0 THEN
113: exit;
114: END IF;
115: DBMS_SQL.COLUMN_VALUE(l_detailcursor,1,l_detailrowid);
116:

Line 115: DBMS_SQL.COLUMN_VALUE(l_detailcursor,1,l_detailrowid);

111: -- get the next value or exit loop if there isn't one
112: IF DBMS_SQL.FETCH_ROWS(l_detailcursor) <= 0 THEN
113: exit;
114: END IF;
115: DBMS_SQL.COLUMN_VALUE(l_detailcursor,1,l_detailrowid);
116:
117: -- do copy
118: -- Changing literals to bind variables as per coding standard.
119: l_sqlstatement := 'INSERT INTO '|| p_owner || '.' || l_arctablename --Bug#6681753

Line 124: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);

120: || ' SELECT * FROM ' ||
121: l_sourcetable || ' WHERE ROWID = :b_detailrowid ';
122: -- l_sourcetable || ' WHERE ROWID = ' || '''' ||
123: -- ':b_detailrowid '|| '''';
124: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);
125:
126: -- Using bind variable, added by Khaja
127: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
128:

Line 127: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);

123: -- ':b_detailrowid '|| '''';
124: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);
125:
126: -- Using bind variable, added by Khaja
127: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
128:
129: l_return := DBMS_SQL.EXECUTE(g_copycursor);
130:
131: -- do delete

Line 129: l_return := DBMS_SQL.EXECUTE(g_copycursor);

125:
126: -- Using bind variable, added by Khaja
127: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
128:
129: l_return := DBMS_SQL.EXECUTE(g_copycursor);
130:
131: -- do delete
132: -- Changing literals to bind variables as per coding standard.
133: l_sqlstatement := 'DELETE FROM ' ||l_sourcetable ||

Line 135: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);

131: -- do delete
132: -- Changing literals to bind variables as per coding standard.
133: l_sqlstatement := 'DELETE FROM ' ||l_sourcetable ||
134: ' WHERE ROWID = :b_detailrowid ';
135: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);
136:
137: -- Using bind variable, added by Khaja
138: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
139:

Line 138: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);

134: ' WHERE ROWID = :b_detailrowid ';
135: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);
136:
137: -- Using bind variable, added by Khaja
138: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
139:
140: l_return := DBMS_SQL.EXECUTE(g_copycursor);
141:
142: -- check to see if we need to do commit

Line 140: l_return := DBMS_SQL.EXECUTE(g_copycursor);

136:
137: -- Using bind variable, added by Khaja
138: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
139:
140: l_return := DBMS_SQL.EXECUTE(g_copycursor);
141:
142: -- check to see if we need to do commit
143: l_transcount := l_transcount + 1;
144: IF (l_transcount >= p_commitfrequency) THEN

Line 156: IF DBMS_SQL.FETCH_ROWS(l_detailcursor) <= 0 THEN

152: -- repeat the following for each unique detail row in each detail table
153: LOOP
154:
155: -- get the next value or exit loop if there isn't one
156: IF DBMS_SQL.FETCH_ROWS(l_detailcursor) <= 0 THEN
157: exit;
158: END IF;
159: DBMS_SQL.COLUMN_VALUE(l_detailcursor,1,l_detailrowid);
160:

Line 159: DBMS_SQL.COLUMN_VALUE(l_detailcursor,1,l_detailrowid);

155: -- get the next value or exit loop if there isn't one
156: IF DBMS_SQL.FETCH_ROWS(l_detailcursor) <= 0 THEN
157: exit;
158: END IF;
159: DBMS_SQL.COLUMN_VALUE(l_detailcursor,1,l_detailrowid);
160:
161: -- do copy
162: -- Changing literals to bind variables as per coding standard.
163: l_sqlstatement := 'INSERT INTO ' || p_owner || '.' || l_arctablename || --Bug#6681753

Line 166: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);

162: -- Changing literals to bind variables as per coding standard.
163: l_sqlstatement := 'INSERT INTO ' || p_owner || '.' || l_arctablename || --Bug#6681753
164: ' SELECT * FROM ' ||
165: l_sourcetable || ' WHERE ROWID =:b_detailrowid ';
166: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);
167:
168: -- Using bind variable, added by Khaja
169: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
170:

Line 169: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);

165: l_sourcetable || ' WHERE ROWID =:b_detailrowid ';
166: DBMS_SQL.PARSE(g_copycursor,l_sqlstatement,DBMS_SQL.NATIVE);
167:
168: -- Using bind variable, added by Khaja
169: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
170:
171: l_return := DBMS_SQL.EXECUTE(g_copycursor);
172:
173: -- check to see if we need to do commit

Line 171: l_return := DBMS_SQL.EXECUTE(g_copycursor);

167:
168: -- Using bind variable, added by Khaja
169: dbms_sql.bind_variable(g_copycursor, 'b_detailrowid',l_detailrowid);
170:
171: l_return := DBMS_SQL.EXECUTE(g_copycursor);
172:
173: -- check to see if we need to do commit
174: l_transcount := l_transcount + 1;
175: IF (l_transcount >= p_commitfrequency) THEN

Line 189: DBMS_SQL.CLOSE_CURSOR(l_detailcursor);

185:
186: END LOOP; -- table loop
187:
188: -- close 'em up, turn off the lights
189: DBMS_SQL.CLOSE_CURSOR(l_detailcursor);
190: DBMS_SQL.CLOSE_CURSOR(g_copycursor);
191:
192: -- This enables the constriant for only PM_MATL_DTL
193: -- if upper(l_sourcetable)='PM_MATL_DTL' then

Line 190: DBMS_SQL.CLOSE_CURSOR(g_copycursor);

186: END LOOP; -- table loop
187:
188: -- close 'em up, turn off the lights
189: DBMS_SQL.CLOSE_CURSOR(l_detailcursor);
190: DBMS_SQL.CLOSE_CURSOR(g_copycursor);
191:
192: -- This enables the constriant for only PM_MATL_DTL
193: -- if upper(l_sourcetable)='PM_MATL_DTL' then
194: if pm_matl_dtl_flag then