The following lines contain the word 'select', 'insert', 'update' or 'delete':
UPDATE gmd_specifications_b
SET spec_status = p_to_status
WHERE spec_id = p_spec_id;
UPDATE gmd_specifications_b
SET spec_status = l_pending_status
WHERE spec_id = p_spec_id;
UPDATE gmd_specifications_b
SET spec_status = l_rework_status
WHERE spec_id = p_spec_id;
update_vr_status(p_entity_type,
p_spec_vr_id,
p_to_status);
update_vr_status(p_entity_type,
p_spec_vr_id,
l_pending_status);
update_vr_status(p_entity_type,
p_spec_vr_id,
l_rework_status);
PROCEDURE update_vr_status(pentity_type IN VARCHAR2,
pspec_vr_id IN NUMBER,
p_to_status IN NUMBER) IS
BEGIN
IF (pentity_type = 'I') THEN
UPDATE gmd_inventory_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = pspec_vr_id;
UPDATE gmd_wip_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = pspec_vr_id;
UPDATE gmd_customer_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = pspec_vr_id;
UPDATE gmd_supplier_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = pspec_vr_id;
UPDATE gmd_monitoring_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = pspec_vr_id;
END update_vr_status;
SELECT v.spec_vr_id,'I' spec_type
FROM gmd_inventory_spec_vrs v
WHERE v.spec_id = p_spec_id
AND v.spec_vr_status < p_to_status
UNION
SELECT v.spec_vr_id,'W' spec_type
FROM gmd_wip_spec_vrs v
WHERE v.spec_id = p_spec_id
AND v.spec_vr_status < p_to_status
UNION
SELECT v.spec_vr_id,'C' spec_type
FROM gmd_customer_spec_vrs v
WHERE v.spec_id = p_spec_id
AND v.spec_vr_status < p_to_status
UNION
SELECT v.spec_vr_id,'S' spec_type
FROM gmd_supplier_spec_vrs v
WHERE v.spec_id = p_spec_id
AND v.spec_vr_status < p_to_status
UNION
SELECT v.spec_vr_id,v.rule_type
FROM gmd_monitoring_spec_vrs v
WHERE v.spec_id = p_spec_id
AND v.spec_vr_status < p_to_status
UNION
SELECT v.spec_vr_id,'T' spec_type
FROM gmd_stability_spec_vrs v
WHERE v.spec_id = p_spec_id
AND v.spec_vr_status < p_to_status;
update_vr_status(pentity_type => l_spec_type,
pspec_vr_id => l_spec_validity_rule_id,
p_to_status => p_to_status);
SELECT DECODE(l_spec_type,'I','oracle.apps.gmd.qm.spec.vr.inv',
'W','oracle.apps.gmd.qm.spec.vr.wip',
'C','oracle.apps.gmd.qm.spec.vr.cus',
'S','oracle.apps.gmd.qm.spec.vr.sup',
'R','oracle.apps.gmd.qm.spec.vr.mon',
'L','oracle.apps.gmd.qm.spec.vr.mon')
INTO l_event_name
FROM sys.dual;
/* Lets first update the status of the entity to to status */
IF p_event = 'oracle.apps.gmd.qm.spec.vr.inv' THEN
UPDATE gmd_inventory_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = p_event_key
AND spec_vr_status <> p_to_status;
UPDATE gmd_wip_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = p_event_key
AND spec_vr_status <> p_to_status;
UPDATE gmd_customer_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = p_event_key
AND spec_vr_status <> p_to_status;
UPDATE gmd_supplier_spec_vrs
SET spec_vr_status = p_to_status
WHERE spec_vr_id = p_event_key
AND spec_vr_status <> p_to_status;
UPDATE gmd_specifications_b
SET spec_status = p_to_status
WHERE spec_id = p_event_key
AND spec_status <> p_to_status;
SELECT hr.NAME
FROM MTL_parameters mp, hr_all_organization_units hr
WHERE mp.ORGANIZATION_CODE =p_orgn_code
and hr.organization_id = mp.organization_id;
SELECT USER_NAME
FROM FND_USER
WHERE user_id = p_user_id;
SELECT TEST_METHOD_CODE
FROM gmd_test_methods
WHERE TEST_METHOD_ID = p_test_method_id;
SELECT TEST_METHOD_DESC
FROM gmd_test_methods
WHERE TEST_METHOD_ID = p_test_method_id;
SELECT
hzp.party_name
FROM
hz_parties hzp
, hz_cust_accounts_all hzca
WHERE hzp.party_id = hzca.party_id
AND hzca.cust_account_id = p_cust_id
;
SELECT name
FROM hr_operating_units
WHERE organization_id = p_org_id
;
SELECT location
FROM hz_cust_site_uses_all
WHERE site_use_id = p_ship_to_site_id
;
SELECT order_number
FROM oe_order_headers_all
WHERE header_id = p_order_id
;
SELECT b.name
FROM oe_order_headers_all a, oe_transaction_types_tl b
WHERE a.order_type_id = b.transaction_type_id
AND a.header_id = p_order_id
;
SELECT line_number
FROM oe_order_lines_all
WHERE line_id = p_order_line_id
;
SELECT segment1
FROM po_vendors
WHERE vendor_id = p_supp_id
;
SELECT vendor_name
FROM po_vendors
WHERE vendor_id = p_supp_id
;
SELECT vendor_site_code
FROM po_vendor_sites_all
WHERE vendor_site_id = p_supp_site_id
;
SELECT segment1
FROM po_headers_all
WHERE po_header_id = p_po_id
;
SELECT line_num
FROM po_lines_all
WHERE po_line_id = p_po_line_id
;
SELECT receipt_num
FROM rcv_shipment_headers
WHERE shipment_header_id = p_receipt_id
;
SELECT line_num
FROM rcv_shipment_lines
WHERE shipment_line_id = p_receipt_line_id
;
SELECT meaning
FROM gmd_qc_status
WHERE status_code = p_status_code
AND entity_type = p_entity_type
;
UPDATE gmd_stability_studies_b
SET status = p_to_status
WHERE ss_id = p_ss_id;
UPDATE gmd_stability_studies_b
SET status = l_pending_status
WHERE ss_id = p_ss_id;
UPDATE gmd_stability_studies_b
SET status = l_rework_status
WHERE ss_id = p_ss_id;
select test_desc
from gmd_qc_tests
where test_id = p_test_id;
SELECT meaning
FROM gem_lookups
WHERE lookup_type = 'GMD_QC_FREQUENCY_PERIOD'
and lookup_code = p_time ;
SELECT ORGANIZATION_CODE
FROM MTL_PARAMETERS
WHERE ORGANIZATION_ID = p_orgn_id;
SELECT concatenated_segments
FROM mtl_system_items_kfv
WHERE inventory_item_Id = p_item_id
AND ORGANIZATION_ID = p_org_id;
SELECT distinct concatenated_segments
FROM mtl_system_items_kfv
WHERE inventory_item_Id = p_item_id ;
SELECT description
FROM mtl_system_items_kfv
WHERE inventory_item_Id = p_item_id
AND ORGANIZATION_ID = p_org_id;
SELECT SPEC_NAME
FROM gmd_specifications
WHERE SPEC_ID = p_spec_id ;
SELECT SPEC_VERS
FROM gmd_specifications
WHERE SPEC_ID = p_spec_id ;
SELECT primary_uom_code
FROM mtl_system_items
WHERE inventory_item_Id = p_item_id
AND ORGANIZATION_ID = p_org_id;
SELECT concatenated_segments
FROM mtl_item_locations_kfv
WHERE inventory_location_id = p_loc_id ;
SELECT meaning
FROM fnd_lookup_values_vl
WHERE lookup_type = plookup_type
AND lookup_code = plookup_code;
SELECT CALC_UOM_CONV_IND
FROM GMD_SPEC_TESTS
WHERE SPEC_ID = p_spec_id
AND TEST_ID = p_test_id;
SELECT primary_uom_code
FROM mtl_system_items
WHERE inventory_item_Id = p_item_id
AND ORGANIZATION_ID = p_organization_id;
SELECT NVL(REPORT_PRECISION,-1)
FROM GMD_QC_TESTS
WHERE TEST_ID = p_test_id;
SELECT LENGTH(l_value) INTO l_total_length FROM DUAL;
SELECT INSTR(l_value,'.') INTO l_dot_precision FROM DUAL;
SELECT SUBSTR(l_value, 0) INTO x_decimal_value FROM DUAL;
SELECT SUBSTR(l_value, 0, l_dot_precision - 1) INTO x_decimal_value FROM DUAL;
SELECT RPAD(l_value,l_total_length,'.') INTO l_value FROM DUAL;
SELECT RPAD(l_value,l_final_length,'0') INTO x_decimal_value FROM DUAL;
select max(change_disp_id)
from GMD_CHANGE_DISPOSITION
where sampling_event_id = p_sampling_event_id
and organization_id = p_organization_id
group by organization_id;
select max(change_disp_id)
from GMD_CHANGE_DISPOSITION
where sample_id = p_sample_id
and sampling_event_id = p_sampling_event_id
and organization_id = p_organization_id
group by organization_id;
select gl.meaning
from gmd_change_disposition gcd ,gem_lookups gl
where gl.lookup_type = 'GMD_QC_SAMPLE_DISP'
and gl.lookup_code = gcd.disposition_from
and gcd.change_disp_id = p_change_disp_id;
select gl.meaning
from gmd_change_disposition gcd ,gem_lookups gl
where gl.lookup_type = 'GMD_QC_SAMPLE_DISP'
and gl.lookup_code = gcd.disposition_to
and gcd.change_disp_id = p_change_disp_id;
SELECT 'Y'
FROM gmd_composite_spec_disp
WHERE event_spec_disp_id = p_event_spec_disp_id;
SELECT license_plate_number
FROM wms_license_plate_numbers
WHERE lpn_id = p_lpn_id;