The following lines contain the word 'select', 'insert', 'update' or 'delete':
' INSERT INTO mrp_form_query' ||
'(query_id, ' ||
'last_update_date, ' ||
'last_updated_by, ' ||
'last_update_login, ' ||
'creation_date, ' ||
'created_by, ' ||
'char1, ' ||
count_list_mfq ||',' || 'number5, number13) ' ||
' SELECT /*+ CHOOSE */ '||
':var_exception_id ' ||
', TRUNC(SYSDATE),' ||
'-1, -1,' ||
'TRUNC(SYSDATE),' ||
'-1, ' ||
'compile_designator, ' ||
count_list ||', ' ||
'sum(exception_count), display ' ||
' FROM mrp_item_exception_v ' ||
' WHERE compile_designator = :compile_designator' ||
' and organization_id= decode( :planning_org ,:planned_org,organization_id,:planned_org) '||
' and organization_id= decode(:all_orgs, :n '||
', organization_id,:planned_org )'||
where_clause_segment ||
'GROUP BY compile_designator, display, ' ||
count_list;
SELECT mrp_form_query_s.NEXTVAL
INTO exception_id
FROM dual;
' INSERT INTO mrp_form_query' ||
'(query_id, ' ||
'last_update_date, ' ||
'last_updated_by, ' ||
'last_update_login, ' ||
'creation_date, ' ||
'created_by, ' ||
'char1, ' ||
'number1, ' ||
'number2, ' ||
'number3, ' ||
'number4, ' ||
'number6, ' ||
'number7, ' ||
'number8, ' ||
'number9, ' ||
'number10, ' ||
'number11, ' ||
'number12, ' ||
'number13, ' ||
'char2, ' ||
'char9, ' ||
'char4, ' ||
'char8 ) ' ||
' SELECT /*+ CHOOSE*/ DISTINCT ' ||
' :exception_id,' ||
' TRUNC(SYSDATE),' ||
'-1, -1,' ||
'TRUNC(SYSDATE),' ||
'-1, ' ||
'compile_designator, ' ||
'version, ' ||
'exception_type, ' ||
'inventory_item_id, ' ||
'organization_id, ' ||
'project_id, ' ||
'task_id, ' ||
'category_id, ' ||
'department_id, ' ||
'resource_id, ' ||
'line_id, ' ||
'resource_type, ' ||
'display, ' ||
'planner_code, ' ||
'buyer_name, ' ||
'planning_group, ' ||
'row_id ' ||
' FROM mrp_item_exception_v ' ||
' WHERE compile_designator = :compile_designator' ||
' and organization_id= decode(:planning_org,:planned_org ' ||
', organization_id,:planned_org) '||
' and organization_id= decode( :all_orgs '||
', :n,organization_id,:planned_org ) '||
' and version is null ' ||
where_clause_segment;
SELECT MAX(NVL(version,0))+1
INTO version_id
FROM mrp_item_exceptions
WHERE compile_designator= plan;
INSERT INTO mrp_item_exceptions
(exception_type, inventory_item_id, compile_designator,
organization_id, last_update_date, last_updated_by,
creation_date, created_by, last_update_login, display, request_id,
program_application_id, program_id,
program_update_date, updated, status, exception_count, project_id,
task_id, version, planning_group,
department_id, resource_id, line_id)
SELECT exception_type, inventory_item_id, compile_designator,
organization_id, last_update_date, last_updated_by,
creation_date, created_by, last_update_login, display, request_id,
program_application_id, program_id,
program_update_date, updated, status, exception_count, project_Id,
task_id, version_id, planning_group,
department_id, resource_id, line_id
FROM mrp_item_exceptions
WHERE version is null
AND compile_designator= plan;
PROCEDURE update_row(p_exception_id number,
p_omit_list VARCHAR2,
p_row_id VARCHAR2,
p_last_update_login NUMBER,
p_last_updated_by NUMBER) IS
c integer;
'update mrp_item_exceptions
set display = 2,
last_update_login = :last_update_login,
last_updated_by = :last_updated_by,
last_update_date = sysdate
where rowid in (
select chartorowid(char8)
from mrp_form_query
where ' ||p_omit_list||
' and query_id = :exception_id )';
dbms_sql.bind_variable(c,'last_update_login',p_last_update_login);
dbms_sql.bind_variable(c,'last_updated_by',p_last_updated_by);
END update_row;
'select display
from mrp_item_exceptions
where rowid in (
select chartorowid(char8)
from mrp_form_query
where ' ||p_omit_list||
' and query_id = :exception_id )'||
' for update of display nowait ';
SELECT item_number INTO v_item_number
FROM mtl_item_flexfields
WHERE organization_id = p_org_id
AND inventory_item_id = p_inventory_item_id;
select vendor_name
into supplier_name
from po_vendors
where
vendor_id = arg_supplier_id;
select vendor_site_code
into supplier_site
from po_vendor_sites_all
where
vendor_site_id = arg_supplier_site_id;