The following lines contain the word 'select', 'insert', 'update' or 'delete':
select count(*)
into n
from amw_assessment_components
where assessment_id = P_ASSESSMENT_ID
and component_code = P_COMPONENT_CODE;
select count(*)
into n
from amw_assessment_components
where object_id = P_OBJECT_ID
and object_type = P_OBJECT_TYPE
and component_code = P_COMPONENT_CODE;
select count(*)
into n
from amw_assessment_components
where assessment_id = P_ASSESSMENT_ID
and component_code = P_COMPONENT_CODE;
select count(*)
into n
from amw_assessment_components
where object_id = P_OBJECT_ID
and object_type = P_OBJECT_TYPE
and component_code = P_COMPONENT_CODE;
select meaning
into yes
from fnd_lookups
where lookup_type='YES_NO'
and lookup_code='Y';
select meaning
into no
from fnd_lookups
where lookup_type='YES_NO'
and lookup_code='N';
p_select_flag IN VARCHAR2,
-- p_assessment_id IN NUMBER, -- 11.25.2003 tsho: obseleted, use object_id, object_type instead
p_object_id IN NUMBER, -- 11.25.2003 tsho: combined with object_type will replace assessment_id
p_object_type IN VARCHAR2, -- 11.25.2003 tsho: combined with obejct_id will replace assessment_id
p_component_code IN VARCHAR2,
x_return_status OUT NOCOPY VARCHAR2,
x_msg_count OUT NOCOPY NUMBER,
x_msg_data OUT NOCOPY VARCHAR2,
p_other_component_value IN VARCHAR2
) IS
l_creation_date date;
l_last_update_date date;
l_last_updated_by number;
l_last_update_login number;
delete from amw_assessment_components
where assessment_id = p_assessment_id
and component_code = p_component_code;
delete from amw_assessment_components
where object_id = p_object_id
and object_type = p_object_type
and component_code = p_component_code;
if (p_select_flag = 'Y') then
l_creation_date := SYSDATE;
l_last_update_date := SYSDATE;
l_last_updated_by := FND_GLOBAL.USER_ID;
l_last_update_login := FND_GLOBAL.USER_ID;
select amw_assessment_components_s.nextval into l_assessment_component_id from dual;
insert into amw_assessment_components (assessment_component_id,
-- assessment_id, -- 11.25.2003 tsho: obseleted, use object_id and object_type instead
object_type, -- 11.25.2003: combined with object_id will replace assessment_id
object_id, -- 11.25.2003: combined with object_type will replace assessment_id
component_code,
other_component_value,
creation_date,
created_by,
last_update_date,
last_updated_by,
last_update_login,
object_version_number)
values (l_assessment_component_id,
-- p_assessment_id, -- 11.25.2003 tsho: obseleted, use object_id and object_type instead
p_object_type,
p_object_id,
p_component_code,
p_other_component_value,
l_creation_date,
l_created_by,
l_last_update_date,
l_last_updated_by,
l_last_update_login,
l_object_version_number);