210: NAME:
211: Procedure bld_cf_repos_using_upload_hist():
212:
213: DESCRIPTION:
214: Inserts into AD_CHECK_FILES using information uploaded from applptch.txt.
215: Does something ONLY if the checkfile repository is empty AND is some patch
216: history information exists.
217:
218: NOTE: The only reason dynamic sql is used is bcoz PL/SQL wouldn't let me use
228:
229: select 'x'
230: into dummy
231: from dual
232: where not exists (select 'x' from ad_check_files)
233: and exists (select 'x' from ad_patch_runs);
234: --
235: --
236: execute immediate 'insert into ad_check_files '||
232: where not exists (select 'x' from ad_check_files)
233: and exists (select 'x' from ad_patch_runs);
234: --
235: --
236: execute immediate 'insert into ad_check_files '||
237: '( '||
238: 'check_file_id, file_id, '||
239: 'file_version_id, distinguisher, '||
240: 'creation_date '||
239: 'file_version_id, distinguisher, '||
240: 'creation_date '||
241: ') '||
242: 'select '||
243: 'ad_check_files_s.nextval, max_vers.file_id, '||
244: 'max_vers.file_version_id, max_vers.distinguisher, '||
245: 'sysdate '||
246: 'from '||
247: '( '||
320: commit;
321: --
322: --
323: exception when no_data_found then
324: -- If ad_check_files already has data, or patch-hist is NOT
325: -- populated, simply return.
326: --
327: null;
328: end bld_cf_repos_using_upload_hist;