The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT au.owner_id
FROM asg_user au
WHERE au.group_id = p_group_id
AND au.user_id = au.owner_id
AND au.enabled = 'Y';
SELECT au.owner_id
FROM asg_user au
WHERE au.group_id = p_related_group_id
AND au.user_id = au.owner_id
AND au.enabled = 'Y';
IF p_operation = 'INSERT'
THEN
--calling the package to insert records into CSM_GROUPS table
csm_group_download_pvt.insert_my_group
( P_USER_ID => l_owner_id,
X_RETURN_STATUS => l_return_status,
X_ERROR_MESSAGE => l_error_message);
ELSIF p_operation = 'DELETE'
THEN
--calling the package to delete records from CSM_GROUPS table
csm_group_download_pvt.delete_my_group
( P_USER_ID => l_owner_id,
X_RETURN_STATUS => l_return_status,
X_ERROR_MESSAGE => l_error_message);
IF p_operation = 'INSERT'
THEN
--calling the package to insert Related groups records into CSM_GROUPS table
csm_group_download_pvt.insert_group_acc
( P_USER_ID => l_rel_user_id,
P_GROUP_ID => p_related_group_id,
P_OWNER_ID => l_rel_owner_id,
P_GROUP_TYPE => l_rel_grp_type,
X_RETURN_STATUS => l_rel_return_status,
X_ERROR_MESSAGE => l_rel_error_message);
ELSIF p_operation = 'DELETE'
THEN
--calling the package to insert Related groups records into CSM_GROUPS table
csm_group_download_pvt.delete_group_acc
( P_USER_ID => l_rel_user_id,
P_GROUP_ID => p_related_group_id,
X_RETURN_STATUS => l_rel_return_status,
X_ERROR_MESSAGE => l_rel_error_message);
SELECT au.owner_id
FROM asg_user au
WHERE au.group_id = p_group_id
AND au.user_id = au.owner_id
AND au.enabled = 'Y';
SELECT au.owner_id
FROM asg_user au
WHERE au.group_id = p_group_id
AND au.user_id = au.owner_id
AND au.enabled = 'Y';
IF p_operation = 'INSERT'
THEN
--calling the package to insert records into CSM_GROUPS table
csm_group_download_pvt.insert_my_group
( P_USER_ID => l_owner_id,
X_RETURN_STATUS => l_return_status,
X_ERROR_MESSAGE => l_error_message);
ELSIF p_operation = 'DELETE'
THEN
--calling the package to delete records from CSM_GROUPS table
csm_group_download_pvt.delete_my_group
( P_USER_ID => l_owner_id,
X_RETURN_STATUS => l_return_status,
X_ERROR_MESSAGE => l_error_message);
l_rel_group_id_tbl.DELETE;
IF p_operation = 'INSERT'
THEN
--calling the package to insert Related groups records into CSM_GROUPS table
csm_group_download_pvt.insert_group_acc
( P_USER_ID => l_rel_user_id,
P_GROUP_ID => l_rel_group_id,
P_OWNER_ID => l_rel_owner_id,
P_GROUP_TYPE => l_rel_grp_type,
X_RETURN_STATUS => l_rel_return_status,
X_ERROR_MESSAGE => l_rel_error_message);
ELSIF p_operation = 'DELETE'
THEN
--calling the package to insert Related groups records into CSM_GROUPS table
csm_group_download_pvt.delete_group_acc
( P_USER_ID => l_rel_user_id,
P_GROUP_ID => l_rel_group_id,
X_RETURN_STATUS => l_rel_return_status,
X_ERROR_MESSAGE => l_rel_error_message);
SELECT au.owner_id
FROM asg_user au
WHERE au.group_id = p_group_id
AND au.user_id = au.owner_id
AND au.enabled = 'Y';
SELECT acc.group_id
FROM csm_groups acc
WHERE acc.user_id = p_owner_id
AND acc.group_owner_id <> acc.user_id;
l_rel_group_id_tbl.DELETE;