The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT csgb.created_by
,csgb.creation_date
,csgb.start_date
,csgb.end_date
,csgb.last_update_date
,csgb.last_update_login
,csgb.last_updated_by
,csgb.default_incident_status_id
,csgb.transition_ind --bug 8225437
,csgb.security_group_id
,csgb.group_name
,csgb.description
,csgb.language
,csgb.source_lang
FROM CS_SR_STATUS_GROUPS_VL csgb
WHERE csgb.status_group_id = p_statusGroupId ;
SELECT *
FROM CS_SR_ALLOWED_STATUSES
WHERE status_group_id = p_statusGroupId;
SELECT *
FROM CS_SR_STATUS_TRANSITIONS
WHERE status_group_id = p_statusGroupId;
SELECT CS_SR_STATUS_GROUPS_B_S.nextval INTO lv_new_statusgroupID FROM DUAL;
CS_SR_STATUS_GROUPS_PKG.INSERT_ROW
( X_ROWID => l_row_id ,
X_STATUS_GROUP_ID => lv_new_statusgroupID ,
X_SECURITY_GROUP_ID => null ,
X_TRANSITION_IND => c_statusGroups_rec.transition_ind ,--bug 8225437
X_OBJECT_VERSION_NUMBER => 1 ,
X_ORIG_SYSTEM_REFERENCE_ID => null ,
X_END_DATE => c_statusGroups_rec.end_date,
X_START_DATE => c_statusGroups_rec.start_date,
X_DEFAULT_INCIDENT_STATUS_ID => c_statusGroups_rec.default_incident_status_id,
X_GROUP_NAME => lv_copy_of_group_name ,
X_DESCRIPTION => c_statusGroups_rec.description,
X_LANGUAGE => c_statusGroups_rec.language ,
X_SOURCE_LANG => c_statusGroups_rec.source_lang ,
X_CREATION_DATE => sysdate,
X_CREATED_BY => FND_GLOBAL.USER_ID ,
X_LAST_UPDATE_DATE => sysdate ,
X_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
X_LAST_UPDATE_LOGIN => null) ;
/*** Commented since the insert into cs_sr_status_groups_b and cs_sr_status_groups_tl will be
done using table handlers as above
--Insert a new record into CS_SR_STATUS_GROUPS_B
INSERT INTO CS_SR_STATUS_GROUPS_B(
status_group_id,
created_by,
creation_date,
start_date,
end_date,
last_update_date,
last_update_login,
last_updated_by,
default_incident_status_id,
security_group_id,
object_version_number)
VALUES (
lv_new_statusgroupID,
FND_GLOBAL.USER_ID,
sysdate,
c_statusGroups_rec.start_date,
c_statusGroups_rec.end_date,
sysdate,
FND_GLOBAL.LOGIN_ID,
FND_GLOBAL.USER_ID,
c_statusGroups_rec.default_incident_status_id,
c_statusGroups_rec.security_group_id,
0);
INSERT INTO CS_SR_STATUS_GROUPS_TL(
status_group_id,
created_by,
creation_date,
last_update_date,
last_update_login,
last_updated_by,
group_name,
description,
language,
source_lang )
VALUES (
lv_new_statusgroupID,
FND_GLOBAL.USER_ID,
sysdate,
sysdate,
FND_GLOBAL.LOGIN_ID,
FND_GLOBAL.USER_ID,
lv_copy_of_group_name,
c_statusGroups_rec.description,
c_statusGroups_rec.language,
c_statusGroups_rec.source_lang );
INSERT INTO CS_SR_ALLOWED_STATUSES(
status_group_id,
created_by,
creation_date,
start_date,
end_date,
last_update_date,
last_update_login,
last_updated_by,
allowed_status_id,
incident_status_id,
object_version_number)
VALUES (
lv_new_statusgroupID,
FND_GLOBAL.USER_ID,
sysdate,
c_allowedStatuses_rec.start_date,
c_allowedStatuses_rec.end_date,
sysdate,
FND_GLOBAL.LOGIN_ID,
FND_GLOBAL.USER_ID,
CS_SR_ALLOWED_STATUSES_S.nextval,
c_allowedStatuses_rec.incident_status_id,
0);
SELECT allowed_status_id
INTO l_from_allowed_status_id
FROM cs_sr_allowed_statuses
WHERE status_group_id = lv_new_statusgroupID
AND incident_status_id = c_StatusTransitions_rec.from_incident_status_id ;
SELECT allowed_status_id
INTO l_to_allowed_status_id
FROM cs_sr_allowed_statuses
WHERE status_group_id = lv_new_statusgroupID
AND incident_status_id = c_StatusTransitions_rec.to_incident_status_id ;
INSERT INTO CS_SR_STATUS_TRANSITIONS(
status_group_id,
created_by,
creation_date,
start_date,
end_date,
last_update_date,
last_update_login,
last_updated_by,
status_transition_id,
from_allowed_status_id,
to_allowed_status_id,
from_incident_status_id,
to_incident_status_id,
object_version_number,
task_template_id, -- 11825540
workflow) -- 11825540 )
VALUES (
lv_new_statusgroupID,
FND_GLOBAL.USER_ID,
sysdate,
c_statusTransitions_rec.start_date,
c_statusTransitions_rec.end_date,
sysdate,
FND_GLOBAL.LOGIN_ID,
FND_GLOBAL.USER_ID,
CS_SR_STATUS_TRANSITIONS_S.nextval,
l_from_allowed_status_id,
l_to_allowed_status_id,
c_StatusTransitions_rec.from_incident_status_id,
c_StatusTransitions_rec.to_incident_status_id,
0,
c_StatusTransitions_rec.task_template_id, -- 11825540
c_StatusTransitions_rec.workflow); -- 11825540
SELECT start_date
FROM cs_sr_status_transitions
WHERE (from_allowed_status_id = p_allowed_status_id
OR to_allowed_status_id = p_allowed_status_id)
AND status_group_id = p_statusGroupId;
SELECT end_date,status_group_id
FROM cs_sr_status_transitions
WHERE (from_allowed_status_id = p_allowed_status_id
OR to_allowed_status_id = p_allowed_status_id)
AND status_group_id = p_statusGroupId;
SELECT default_incident_status_id
FROM cs_sr_status_groups_b
WHERE status_group_id = p_statusgroupid ;
SELECT start_date
INTO l_returnStartDate
FROM cs_sr_allowed_statuses
WHERE allowed_status_id = p_allowed_status_id
AND ROWNUM < 2;
SELECT end_date
INTO l_returnEndDate
FROM cs_sr_allowed_statuses
WHERE allowed_status_id = p_allowed_status_id
AND ROWNUM < 2;
UPDATE cs_sr_allowed_statuses
SET end_date = null
WHERE allowed_status_id in (p_to_allowed_status_id,p_from_allowed_status_id)
AND status_group_id = p_statusGroupId;
SELECT count(0)
INTO Status_Transition_Counter
FROM cs_sr_status_transitions
WHERE status_group_id = p_statusGroupId;
UPDATE cs_sr_status_groups_b
SET transition_ind = Indicator
WHERE status_group_id = p_statusGroupId;