The following lines contain the word 'select', 'insert', 'update' or 'delete':
select
special_attribute_id,
txn_category_attribute_id,
attribute_type_cd,
key_attribute_type,
enable_flag,
flex_code,
object_version_number,
ddf_column_name,
ddf_value_column_name,
context
from pqh_special_attributes
where special_attribute_id = p_special_attribute_id;
select special_attribute_id,
txn_category_attribute_id,
attribute_type_cd,
key_attribute_type,
enable_flag,
flex_code,
object_version_number,
ddf_column_name,
ddf_value_column_name,
context
from pqh_special_attributes
where special_attribute_id = p_special_attribute_id
for update nowait;
,p_last_update_date in varchar2
) is
--
l_effective_date date := sysdate ;
l_last_updated_by pqh_special_attributes.last_updated_by%TYPE;
l_last_update_date pqh_special_attributes.last_update_date%TYPE;
l_last_update_login pqh_special_attributes.last_update_login%TYPE;
cursor c1 is select userenv('LANG') from dual ;
select attribute_id
from pqh_attributes
where key_column_name = p_column_name
and legislation_code is null
and nvl(master_table_route_id,-999) = nvl(p_table_id, -999);
select transaction_category_id
from pqh_transaction_categories
where short_name = p_short_name
and business_group_id is null;
select table_route_id
from pqh_table_route
where table_alias = p_table_alias;
select txn_category_attribute_id
from pqh_txn_category_attributes
where attribute_id = p_attribute_id
and transaction_category_id = p_transaction_category_id;
select special_attribute_id
from pqh_special_attributes
where txn_category_attribute_id = p_txn_category_attribute_id
and key_attribute_type = p_key_attribute_type
and context = p_context;
l_last_updated_by := -1;
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_special_attributes
set flex_code = p_flex_code,
ddf_column_name = p_ddf_column_name,
ddf_value_column_name = p_ddf_value_column_name,
key_attribute_type = p_key_attribute_type,
attribute_type_cd = nvl(p_attribute_type_cd,p_key_attribute_type),
enable_flag = nvl(p_enable_flag,'Y'),
last_updated_by = l_last_updated_by,
last_update_date = l_last_update_date,
last_update_login = l_last_update_login
where special_attribute_id = l_special_attribute_id
and nvl(last_updated_by, -1) in (l_last_updated_by,-1,0,1);
select pqh_special_attributes_s.nextval into l_special_attribute_id from dual;
insert into pqh_special_attributes
( special_attribute_id,
txn_category_attribute_id,
key_attribute_type,
attribute_type_cd,
enable_flag,
flex_code,
object_version_number,
ddf_column_name,
ddf_value_column_name,
context,
created_by,
creation_date,
last_updated_by,
last_update_date ,
last_update_login
)
Values
( l_special_attribute_id,
l_txn_category_attribute_id,
p_key_attribute_type,
nvl(p_attribute_type_cd,p_key_attribute_type),
nvl(p_enable_flag,'Y'),
p_flex_code,
l_object_version_number,
p_ddf_column_name,
p_ddf_value_column_name,
p_context,
l_created_by,
l_creation_date,
l_last_updated_by,
l_last_update_date,
l_last_update_login
);