The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
copy_entity_function_id,
table_route_id,
function_type_cd,
pre_copy_function_name,
copy_function_name,
post_copy_function_name,
object_version_number,
context
from pqh_copy_entity_functions
where copy_entity_function_id = p_copy_entity_function_id;
select copy_entity_function_id,
table_route_id,
function_type_cd,
pre_copy_function_name,
copy_function_name,
post_copy_function_name,
object_version_number,
context
from pqh_copy_entity_functions
where copy_entity_function_id = p_copy_entity_function_id
for update nowait;
,p_last_update_date in varchar2
) is
--
--
l_effective_date date := sysdate ;
l_last_updated_by pqh_copy_entity_functions.last_updated_by%TYPE;
l_last_update_date pqh_copy_entity_functions.last_update_date%TYPE;
l_last_update_login pqh_copy_entity_functions.last_update_login%TYPE;
cursor c1 is select userenv('LANG') from dual ;
select table_route_id
from pqh_table_route
where table_alias = p_table_alias;
select copy_entity_function_id
from pqh_copy_entity_functions
where table_route_id = p_table_route_id
and function_type_cd = p_function_type_cd
and context = p_context;
l_last_updated_by := 1;
l_last_updated_by := fnd_load_util.owner_id(p_owner);
l_creation_date := nvl(to_date(p_last_update_date,'YYYY/MM/DD'),trunc(sysdate));
l_last_update_date := nvl(to_date(p_last_update_date,'YYYY/MM/DD'),trunc(sysdate));
l_last_update_date := sysdate;
l_last_update_login := 0;
update pqh_copy_entity_functions
set pre_copy_function_name = p_pre_copy_function_name,
copy_function_name = p_copy_function_name,
post_copy_function_name = p_post_copy_function_name,
last_updated_by = l_last_updated_by,
last_update_date = l_last_update_date,
last_update_login = l_last_update_login
where copy_entity_function_id = l_copy_entity_function_id
and nvl(last_updated_by , -1) in (l_last_updated_by,-1,1);
select pqh_copy_entity_functions_s.nextval into l_copy_entity_function_id from dual;
insert into pqh_copy_entity_functions
( copy_entity_function_id,
table_route_id,
function_type_cd,
pre_copy_function_name,
copy_function_name,
post_copy_function_name,
object_version_number,
context,
creation_date,
created_by,
last_update_date,
last_update_login,
last_updated_by
)
Values
(
l_copy_entity_function_id,
l_table_route_id,
p_function_type_cd,
p_pre_copy_function_name,
p_copy_function_name,
p_post_copy_function_name,
l_object_version_number,
p_context,
l_creation_date,
l_created_by,
l_last_update_date,
l_last_update_login,
l_last_updated_by
);