The following lines contain the word 'select', 'insert', 'update' or 'delete':
select fnd_concurrent_requests_s.currval
into G_IMPORT_SESSION_ID
from dual;
select release_name
into G_CURRENT_RELEASE
from fnd_product_groups;
select patch_driver_id
into l_patch_driver_id
from ad_patch_drivers
where file_contents_checksum = p_chksum
and file_size = p_fil_size
and driver_file_name = p_drv_fil_nm;
select patch_driver_id
into l_patch_driver_id
from ad_patch_drivers
where imported_from_db = p_exported_from_db
and imported_id = p_src_ptch_drvr_id;
select applied_patch_id
into l_applied_patch_id
from ad_applied_patches
where imported_from_db = p_exported_from_db
and imported_id = p_src_ap_app_ptch_id;
insert into ad_patch_drivers
(
patch_driver_id,
applied_patch_id, driver_file_name,
driver_type_c_flag, driver_type_d_flag, driver_type_g_flag,
platform, platform_version,
file_size, file_contents_checksum,
source_code, orig_patch_name,
merged_driver_flag, merge_date,
creation_date, last_update_date, last_updated_by, created_by,
imported_flag, imported_from_db, imported_id
) values
(
ad_patch_drivers_s.nextval,
l_applied_patch_id, p_drv_fil_nm,
p_drv_typ_cflag, p_drv_typ_dflag, p_drv_typ_gflag,
p_plat, p_platver,
p_fil_size, p_chksum,
p_src_cd, p_orig_ptch_nm,
p_merged_driver_flag, p_merge_date,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID,
'Y', p_exported_from_db, p_src_ptch_drvr_id
);
insert into ad_applied_patches
(
applied_patch_id,
rapid_installed_flag, patch_name,
patch_type, maint_pack_level, source_code,
creation_date, last_update_date, last_updated_by, created_by,
imported_flag, imported_from_db,
imported_id
) values
(
ad_applied_patches_s.nextval,
p_ap_rapid_installed_flag, p_ap_ptch_nm,
p_ap_ptch_typ, p_ap_mtpk_lvl, p_ap_src_cd,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID,
'Y', p_exported_from_db, p_src_ap_app_ptch_id
) returning applied_patch_id into l_applied_patch_id;
insert into ad_patch_drivers
(
patch_driver_id,
applied_patch_id, driver_file_name,
driver_type_c_flag, driver_type_d_flag, driver_type_g_flag,
platform, platform_version,
file_size, file_contents_checksum,
source_code, orig_patch_name,
merged_driver_flag, merge_date,
creation_date, last_update_date, last_updated_by, created_by,
imported_flag, imported_from_db, imported_id
) values
(
ad_patch_drivers_s.nextval,
l_applied_patch_id, p_drv_fil_nm,
p_drv_typ_cflag, p_drv_typ_dflag, p_drv_typ_gflag,
p_plat, p_platver,
p_fil_size, p_chksum,
p_src_cd, p_orig_ptch_nm,
p_merged_driver_flag, p_merge_date,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID,
'Y', p_exported_from_db, p_src_ptch_drvr_id
);
select 'x'
into l_dummy
from ad_patch_driver_minipks
where patch_driver_id = l_patch_driver_id
and app_short_name = l_true_app_short_name;
insert into ad_patch_driver_minipks
(
minipk_id, patch_driver_id,
app_short_name, patch_level,
creation_date, last_update_date, last_updated_by, created_by
) values
(
ad_patch_driver_minipks_s.nextval, l_patch_driver_id,
l_true_app_short_name, p_patch_level,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID
);
select 'x'
into l_dummy
from ad_patch_driver_langs
where patch_driver_id = l_patch_driver_id
and language = p_language;
insert into ad_patch_driver_langs
(
lang_id, patch_driver_id, language,
creation_date, last_update_date, last_updated_by, created_by
) values
(
ad_patch_driver_langs_s.nextval, l_patch_driver_id, p_language,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID
);
select bug_id
into l_bug_id
from ad_bugs
where bug_number = p_bug_number
and aru_release_name = p_aru_release_name;
select 'x'
into l_dummy
from ad_comprising_patches
where patch_driver_id = l_patch_driver_id
and bug_id = l_bug_id;
insert into ad_comprising_patches
(
comprising_patch_id, patch_driver_id, bug_id,
creation_date, last_update_date, last_updated_by, created_by
) values
(
ad_comprising_patches_s.nextval, l_patch_driver_id, l_bug_id,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID
);
select release_id
into G_REC_ALL_PTCHS_ON_RLSE_ID
from ad_releases
where major_version = p_maj_v
and minor_version = p_min_v
and to_char(major_version)||'.'||to_char(minor_version)||'.'||
to_char(tape_version) = p_record_against_rlse;
select appl_top_id
into l_at_id
from ad_appl_tops
where name = p_at_nm
and appl_top_type = 'R' -- only REAL appl-top's
and applications_system_name = p_apps_sys_nm;
select patch_run_id
into l_patch_run_id
from ad_patch_runs
where start_date = p_start_date
and appl_top_id = l_at_id
and patch_driver_id = l_patch_driver_id;
select release_id
into l_rec_this_ptch_on_rlse_id
from ad_releases
where major_version = p_maj_v
and minor_version = p_min_v
and tape_version = p_tap_v;
select release_id
into l_upd_to_rlse_id
from ad_releases
where major_version = p_upd_to_maj_v
and minor_version = p_upd_to_min_v
and tape_version = p_upd_to_tap_v;
select null
into l_upd_to_rlse_id
from ad_patch_runs
where updated_to_release_id = l_upd_to_rlse_id;
insert into ad_patch_runs
(
patch_run_id,
release_id,
session_id,
rapid_install_flag,
updated_to_release_id,
patch_top,
start_date, end_date,
patch_driver_id,
patch_action_options,
appl_top_id,
server_type_admin_flag, server_type_forms_flag,
server_type_node_flag, server_type_web_flag,
source_code,
success_flag, failure_comments,
imported_flag, imported_from_db, imported_id, import_session_id,
creation_date, last_update_date, last_updated_by, created_by
)
values
(
ad_patch_runs_s.nextval,
l_rec_this_ptch_on_rlse_id,
ad_sessions_s.nextval,
p_rapid_install_flag,
l_upd_to_rlse_id,
p_patch_top,
p_start_date, p_end_date,
l_patch_driver_id,
p_patch_action_options,
l_at_id,
p_server_type_admin_flag, p_server_type_forms_flag,
p_server_type_node_flag, p_server_type_web_flag,
p_source_code,
p_success_flag, p_failure_comments,
'Y', p_exported_from_db, p_src_patch_run_id, G_IMPORT_SESSION_ID,
sysdate, sysdate, G_WHO_USER_ID, G_WHO_USER_ID
) returning patch_run_id into G_PATCH_RUN_ID;
procedure update_current_view_snapshot
(
p_use_cache boolean,
p_start_date date,
p_at_nm varchar,
p_apps_sys_nm varchar,
p_chksum number,
p_filsiz number,
p_filnm varchar,
p_pd_src_cd varchar,
p_pr_patch_driver_id number,
p_exported_from_db varchar
) is
l_at_id number;
select appl_top_id
into l_at_id
from ad_appl_tops
where name = p_at_nm
and appl_top_type = 'R' -- only REAL appl-top's
and applications_system_name = p_apps_sys_nm;
select patch_run_id
into l_pr_id
from ad_patch_runs
where start_date = p_start_date
and appl_top_id = l_at_id
and patch_driver_id = l_pd_id;
delete from ad_ptch_hst_exe_cop_tmp; -- to clear prev ptch-run's info
AD_FILE_SYS_SNAPSHOTS_PKG.Update_Current_View(l_pr_id, l_at_id);
end update_current_view_snapshot;