The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT source_code_id, source_code, arc_source_code_for, source_code_for_id
FROM ams_source_codes
WHERE arc_source_code_for = 'CAMP'
AND source_code = l_camp_outcome_Rec.source_code
AND source_code_for_id = l_camp_outcome_Rec.object_id;
select count(*) into l_count from jtf_ih_outcomes_campaigns
where object_id = l_camp_outcome_Rec.object_id
and outcome_id = l_camp_outcome_Rec.outcome_id;
INSERT INTO jtf_ih_outcomes_campaigns
(outcome_id
,object_id
,object_version_number
,created_by
,creation_date
,last_updated_by
,last_update_date
,last_update_login
,object_type
,source_code_id
,source_code)
VALUES
(l_camp_outcome_Rec.outcome_id
,l_camp_outcome_Rec.object_id
,l_camp_outcome_Rec.object_version_number
,l_camp_outcome_Rec.created_by
,l_camp_outcome_Rec.creation_date
,l_camp_outcome_Rec.last_updated_by
,l_camp_outcome_Rec.last_update_date
,l_camp_outcome_Rec.last_update_login
,l_camp_outcome_Rec.object_type
,l_camp_outcome_Rec.source_code_id
,l_camp_outcome_Rec.source_code
);
PROCEDURE Delete_camp_outcome(
P_Api_Version_Number IN NUMBER,
P_Init_Msg_List IN VARCHAR2 := FND_API.G_FALSE,
P_Commit IN VARCHAR2 := FND_API.G_FALSE,
p_validation_level IN NUMBER := FND_API.G_VALID_LEVEL_FULL,
P_camp_outcome_Rec IN camp_outcome_Rec_Type,
X_Return_Status OUT VARCHAR2,
X_Msg_Count OUT NUMBER,
X_Msg_Data OUT VARCHAR2
)
IS
l_api_name CONSTANT VARCHAR2(30) := 'Delete_camp_outcome';
SAVEPOINT DELETE_camp_outcome_PVT;
DELETE FROM jtf_ih_outcomes_campaigns
WHERE outcome_id = l_camp_outcome_Rec.outcome_id
AND source_code = l_camp_outcome_Rec.source_code
AND object_id = l_camp_outcome_Rec.object_id;
End Delete_camp_outcome;
Select object_type from JTF_IH_WRAP_UPS where object_id = p_Camp_id;
update JTF_IH_WRAP_UPS
set object_type = ''
where object_id <> p_object_id;
update JTF_IH_WRAP_UPS set
outcome_id = p_outcome_id,
result_id = p_result_id,
reason_id = p_reason_id,
action_activity_id = p_action_id,
source_code_id = p_action_item_id,
source_code = 'DEFAULT',
object_type = l_object_type
where object_id = p_object_id;
select JTF_IH_WRAP_UPS_S1.nextval into l_wrapId from dual;
insert into JTF_IH_WRAP_UPS (WRAP_ID, OBJECT_ID, OUTCOME_ID,
RESULT_ID, REASON_ID, ACTION_ACTIVITY_ID, SOURCE_CODE_ID,
CREATED_BY, CREATION_DATE, LAST_UPDATED_BY, last_update_date,
SOURCE_CODE, object_type)
VALUES (l_wrapid, p_object_id, p_outcome_id, p_result_id,
p_reason_id, p_action_id, p_action_item_id, G_USER_ID, SYSDATE,
-1, SYSDATE, 'DEFAULT', l_object_type);
update JTF_IH_WRAP_UPS set OBJECT_TYPE = ''
where OBJECT_ID <> p_object_id;