The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
required_flag,
view_flag,
edit_flag,
template_attribute_id,
attribute_id,
template_id,
object_version_number
from pqh_template_attributes
where template_attribute_id = p_template_attribute_id;
select required_flag,
view_flag,
edit_flag,
template_attribute_id,
attribute_id,
template_id,
object_version_number
from pqh_template_attributes
where template_attribute_id = p_template_attribute_id
for update nowait;
,p_last_update_date in varchar2
) is
l_object_version_number number(15);
l_last_updated_by pqh_templates.last_updated_by%TYPE;
l_last_update_date pqh_templates.last_update_date%TYPE;
l_last_update_login pqh_templates.last_update_login%TYPE;
select attribute_id
from pqh_attributes a,pqh_table_route t
where a.key_column_name = p_att_column_name
and a.master_table_route_id= t.table_route_id(+)
and nvl(t.table_alias,'$$$$$') = nvl(p_att_master_table_alias_name,'$$$$$')
and nvl(a.legislation_code,'$$$$$') = nvl(p_legislation_code,'$$$$$');
select template_id, transaction_category_id
from pqh_templates_vl
where short_name = p_template_short_name;
select transaction_category_id
from pqh_txn_category_attributes
where attribute_id = p_attribute_id
and transaction_category_id = p_tem_txn_category_id;
select template_attribute_id
from pqh_template_attributes
where template_id = p_template_id
and attribute_id = p_attribute_id;
l_last_updated_by := -1;
l_last_updated_by := 0;
l_last_updated_by := fnd_load_util.owner_id(p_owner);
l_last_update_date := sysdate;
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_login := 0;
update PQH_TEMPLATE_ATTRIBUTES
set required_flag = p_required_flag,
view_flag = p_view_flag,
edit_flag = p_edit_flag,
last_update_date = l_last_update_date,
last_updated_by = l_last_updated_by,
last_update_login = l_last_update_login
where attribute_id = l_attribute_id
and template_id = l_template_id;
insert into pqh_template_attributes
(required_flag, view_flag, edit_flag, template_attribute_id, attribute_id,
template_id, object_version_number, last_update_date, last_updated_by, last_update_login,
created_by, creation_date)
values
(p_required_flag, p_view_flag, p_edit_flag, pqh_template_attributes_s.nextval, l_attribute_id,
l_template_id, 1, l_last_update_date, l_last_updated_by, l_last_update_login,
l_created_by, l_creation_date);