The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT USER_NAME
FROM FND_USER
WHERE USER_ID = userId;
SELECT 'I' spec_type
FROM GMD_INVENTORY_SPEC_VRS v
WHERE v.spec_vr_id = lSpecVRId
UNION
SELECT 'W' spec_type
FROM GMD_WIP_SPEC_VRS V
WHERE v.spec_vr_id = lSpecVRId
UNION
SELECT 'C' spec_type
FROM GMD_CUSTOMER_SPEC_VRS V
WHERE v.spec_vr_id = lSpecVRId
UNION
SELECT 'S' spec_type
FROM GMD_SUPPLIER_SPEC_VRS V
WHERE v.spec_vr_id = lSpecVRId
UNION
SELECT v.rule_type spec_type
FROM GMD_MONITORING_SPEC_VRS V
WHERE v.spec_vr_id = lSpecVRId
UNION
SELECT 'T' spec_type
FROM GMD_STABILITY_SPEC_VRS V
WHERE v.spec_vr_id = lSpecVRId;
SELECT v.spec_vr_id, s.spec_name , s.spec_vers, 'I' spec_type,
v.organization_id,
p.description spec_status_desc,
t.description spec_vr_status_desc,
v.start_date, v.end_date,
s.revision,
s.grade_code grade_code,
NULL resources,
to_number(NULL) resource_instance_id,
v.last_updated_by ,
s.inventory_item_id,
v.subinventory, v.locator_id
FROM GMD_INVENTORY_SPEC_VRS v ,
GMD_SPECIFICATIONS_B s,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND v.spec_vr_id = lSpecVRId
UNION
SELECT v.spec_vr_id, s.spec_name , s.spec_vers, 'W' spec_type,
v.organization_id,
p.description spec_status_desc,
t.description spec_vr_status_desc,
v.start_date, v.end_date,
s.revision,
s.grade_code grade_code,
NULL resources,
to_number(NULL) resource_instance_id,
v.last_updated_by ,
s.inventory_item_id,
NULL subinventory, NULL locator_id
FROM GMD_WIP_SPEC_VRS V ,
GMD_SPECIFICATIONS_B S,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND v.spec_vr_id = lSpecVRId
UNION
SELECT v.spec_vr_id, s.spec_name , s.spec_vers, 'C' spec_type,
v.organization_id,
p.description spec_status_desc,
t.description spec_vr_status_desc,
v.start_date, v.end_date,
s.revision,
s.grade_code grade_code,
NULL resources,
to_number(NULL) resource_instance_id,
v.last_updated_by ,
s.inventory_item_id,
NULL subinventory, NULL locator_id
FROM GMD_CUSTOMER_SPEC_VRS V ,
GMD_SPECIFICATIONS_B S,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND v.spec_vr_id = lSpecVRId
UNION
SELECT v.spec_vr_id, s.spec_name , s.spec_vers, 'S' spec_type,
v.organization_id,
p.description spec_status_desc,
t.description spec_vr_status_desc,
v.start_date, v.end_date,
s.revision,
s.grade_code grade_code,
NULL resources,
to_number(NULL) resource_instance_id,
v.last_updated_by ,
s.inventory_item_id,
NULL subinventory, NULL locator_id
FROM GMD_SUPPLIER_SPEC_VRS V ,
GMD_SPECIFICATIONS_B S,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND v.spec_vr_id = lSpecVRId
UNION
SELECT v.spec_vr_id, s.spec_name , s.spec_vers, v.rule_type spec_type,
decode(rule_type,'R',v.resource_organization_id,'L',v.locator_organization_id,TO_NUMBER(NULL)) organization_id,
p.description spec_status_desc,
t.description spec_vr_status_desc,
v.start_date, v.end_date,
s.revision,
s.grade_code grade_code,
resources,
resource_instance_id,
v.last_updated_by ,
TO_NUMBER(NULL),
v.subinventory, v.locator_id
FROM GMD_MONITORING_SPEC_VRS V ,
GMD_SPECIFICATIONS_B S,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND v.spec_vr_id = lSpecVRId
UNION
SELECT v.spec_vr_id, s.spec_name , s.spec_vers, 'T' spec_type,
NULL,
p.description spec_status_desc,
t.description spec_vr_status_desc,
v.start_date, v.end_date,
s.revision,
s.grade_code grade_code,
NULL resources,
to_number(NULL) resource_instance_id,
v.last_updated_by ,
TO_NUMBER(NULL),
NULL subinventory, NULL locator_id
FROM GMD_STABILITY_SPEC_VRS V ,
GMD_SPECIFICATIONS_B S,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND v.spec_vr_id = lSpecVRId;
SELECT a.organization_code, hou.name organization_name
FROM mtl_parameters a, hr_all_organization_units hou
WHERE
a.organization_id = v_org_id
AND a.organization_id = hou.organization_id;
select concatenated_segments item_number, description item_description
FROM mtl_system_items_kfv
WHERE
organization_id = v_itemorg
AND inventory_item_id = v_item_id;
SELECT meaning
FROM gem_lookups
WHERE lookup_type = 'GMD_ERES_SOURCE'
AND lookup_code = v_code;
SELECT concatenated_segments loc
FROM mtl_item_locations_kfv
WHERE inventory_location_id = v_loc_id;
SELECT s.spec_name, s.spec_vers, v.rule_type spec_type,
t.description spec_vr_status_desc,
p.description spec_status_desc,
v.start_date, v.end_date,
resources,
resource_instance_id,
v.last_updated_by ,
v.subinventory SUBINV,
src_type.meaning,
locations.concatenated_segments LOC,
a.organization_code,
hou.name organization_name
FROM GMD_MONITORING_SPEC_VRS V ,
GMD_SPECIFICATIONS_B S,
GMD_QC_STATUS_TL p,
GMD_QC_STATUS_TL t,
GEM_LOOKUPS src_type ,
MTL_ITEM_LOCATIONS_KFV locations,
MTL_PARAMETERS a,
HR_ALL_ORGANIZATION_UNITS hou
WHERE V.SPEC_ID = S.SPEC_ID
AND s.spec_status = p.status_code
AND p.entity_type = 'S'
AND p.language = USERENV('LANG')
AND v.spec_vr_status = t.status_code
AND t.entity_type = 'S'
AND t.language = USERENV('LANG')
AND src_type.lookup_type(+) = 'GMD_ERES_SOURCE'
AND src_type.lookup_code(+) = spec_type
AND locations.inventory_location_id(+) = v.locator_id
AND a.organization_id(+) =
decode(rule_type,'R',v.resource_organization_id,'L',v.locator_organization_id,TO_NUMBER(NULL))
AND a.organization_id = hou.organization_id
AND v.spec_vr_id = lSpecVRid;
select nvl( text, '')
from wf_Resources where name = 'WF_ADMIN_ROLE'
and language = userenv('LANG') ;
l_requester := GET_FND_USER_NAME(mont_disp_attr_rec.LAST_UPDATED_BY);
l_requester := GET_FND_USER_NAME(disp_attr_rec.LAST_UPDATED_BY);
ame_api.updateApprovalStatus(applicationIdIn => applicationId,
transactionIdIn => lSpecVRId,
transactionTypeIn => transactionType,
ApproverIn => nextApprover);
ame_api.updateApprovalStatus(applicationIdIn => applicationId,
transactionIdIn => lSpecVRId,
transactionTypeIn => transactionType,
ApproverIn => nextApprover);
SELECT MEANING
FROM GMD_QC_STATUS
WHERE STATUS_CODE = P_STATUS_CODE
AND ENTITY_TYPE = P_ENTITY_TYPE;
l_parameter_list.DELETE;