The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
context,
application_short_name,
legislation_code,
responsibility_key,
transaction_short_name,
object_version_number
from pqh_copy_entity_contexts
where context = p_context;
select context,
application_short_name,
legislation_code,
responsibility_key,
transaction_short_name,
object_version_number
from pqh_copy_entity_contexts
where context = p_context
for update nowait;
,p_last_update_date in varchar2
) is
--
l_effective_date date := sysdate ;
l_last_updated_by pqh_copy_entity_contexts.last_updated_by%TYPE;
l_last_update_date pqh_copy_entity_contexts.last_update_date%TYPE;
l_last_update_login pqh_copy_entity_contexts.last_update_login%TYPE;
cursor c1 is select userenv('LANG') from dual ;
select context
from pqh_copy_entity_contexts
where 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;
insert into pqh_copy_entity_contexts
( context,
application_short_name,
legislation_code,
responsibility_key,
transaction_short_name,
object_version_number,
created_by,
creation_date,
last_updated_by,
last_update_date ,
last_update_login
)
Values
( p_context,
p_application_short_name,
p_legislation_code,
p_responsibility_key,
p_transaction_short_name,
l_object_version_number,
l_created_by,
l_creation_date,
l_last_updated_by,
l_last_update_date,
l_last_update_login
);
update pqh_copy_entity_contexts
set application_short_name = p_application_short_name,
legislation_code = p_legislation_code,
responsibility_key = p_responsibility_key,
transaction_short_name = p_transaction_short_name,
last_updated_by = l_last_updated_by,
last_update_date = l_last_update_date,
last_update_login = l_last_update_login
where context = p_context
and nvl(last_updated_by,-1) in (l_last_updated_by,-1,1) ;