The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT ibe_dsp_obj_lgl_ctnt_s1.NEXTVAL
FROM DUAL;
select item_id
into l_deliverable_id
from ibe_dsp_obj_lgl_ctnt
where context_id = l_context_id
and object_id = p_from_product_id;
select obj_lgl_ctnt_id, object_version_number,item_id
into l_ctnt_id, l_version_number, l_item_id
from ibe_dsp_obj_lgl_ctnt
where context_id = l_context_id
and object_id = l_to_product_id;
DELETE FROM IBE_DSP_OBJ_LGL_ctnt
WHERE obj_lgl_ctnt_id = l_ctnt_id
AND object_version_number = l_version_number
AND object_type = l_object_type;
IBE_Util.Debug('delete if l_deliverable_id is null');
UPDATE IBE_DSP_OBJ_LGL_CTNT
SET LAST_UPDATE_DATE = SYSDATE,
LAST_UPDATED_BY = FND_GLOBAL.user_id,
LAST_UPDATE_LOGIN = FND_GLOBAL.user_id,
OBJECT_ID = l_to_product_id,
OBJECT_TYPE = l_object_type,
CONTEXT_id = l_context_id,
ITEM_id = l_deliverable_id ,
OBJECT_VERSION_NUMBER = l_version_number+1
WHERE OBJ_LGL_CTNT_id = l_ctnt_id
AND OBJECT_VERSION_NUMBER = l_version_number;
IBE_Util.Debug('update with the new l_deliverable_id is null');
IBE_Util.Debug('target product content rec not exist, insert one if l_deliverable_id is null');
IBE_Util.Debug('begin insert new rec for target product, seq id='||l_obj_lgl_ctnt_id);
INSERT INTO IBE_DSP_OBJ_LGL_CTNT (
OBJ_LGL_CTNT_ID,
OBJECT_VERSION_NUMBER,
LAST_UPDATE_DATE,
LAST_UPDATED_BY,
CREATION_DATE,
CREATED_BY,
LAST_UPDATE_LOGIN,
OBJECT_ID,
OBJECT_TYPE,
CONTEXT_ID,
ITEM_ID )
VALUES (
l_obj_lgl_ctnt_id,
1,
SYSDATE,
FND_GLOBAL.user_id,
SYSDATE,
FND_GLOBAL.user_id,
FND_GLOBAL.user_id,
l_to_product_id,
l_object_type,
l_context_id,
l_deliverable_id);
IBE_Util.Debug('done inserting, l_to_product_id'||l_to_product_id
||' object_type='||l_object_type
||' context_id='||l_context_id||' l_deveriableid='||l_deliverable_id);
end; -- end inserting if target product content rec not exists