The following lines contain the word 'select', 'insert', 'update' or 'delete':
select id_flex_num_cl
into item_id_flex_num
from(
SELECT fifst.id_flex_num id_flex_num_cl
FROM fnd_id_flex_structures fifst
WHERE fifst.application_id = 401
AND fifst.id_flex_code = 'MSTK'
AND fifst.enabled_flag = 'Y'
AND fifst.freeze_flex_definition_flag = 'Y'
ORDER BY fifst.id_flex_num)
where rownum<2;
MODE="SELECT" DISPLAY="ALL" TABLEALIAS="SI"')*/NULL;
SELECT (SUM(QUANTITY_IN_QUEUE)
+ SUM(QUANTITY_RUNNING)
+ SUM(QUANTITY_REJECTED)
+ SUM(QUANTITY_WAITING_TO_MOVE))
INTO QUANTITY_REM_IN_PREV
FROM WIP_OPERATIONS
WHERE WIP_ENTITY_ID = WE_ID_p
AND ORGANIZATION_ID = org_id
AND OPERATION_SEQ_NUM < OP_SEQ_p;