The following lines contain the word 'select', 'insert', 'update' or 'delete':
select distinct k.organization_code, b.meaning, e.ss_no, h.variant_no,f.description,
h.sample_qty, h.storage_subinventory, j.concatenated_segments storage_locator,
h.resources, i.spec_name, i.spec_vers, c.scheduled_date,
d.concatenated_segments item_no, d.description item_desc1, e.revision,
c.sampling_event_id, e.owner , c.name
from gmd_ss_material_sources a,
gmd_Qc_status b,
gmd_ss_time_points c,
mtl_system_items_b_kfv d,
gmd_stability_studies_b e ,
gmd_stability_studies_tl f ,
gmd_ss_variants h,
gmd_specifications i,
mtl_item_locations_kfv j,
mtl_parameters k
where c.time_point_id = l_event_key
and c.variant_id = h.variant_id
and h.material_source_id = a.source_id
and a.ss_id = e.ss_id
and d.inventory_item_id = e.inventory_item_id
and d.organization_id = e.organization_id
and h.material_source_id = a.source_id
and h.storage_spec_id = i.spec_id
and e.ss_id = f.ss_id
and b.entity_type = 'STABILITY'
and b.status_code = e.status
and h.storage_locator_id = j.inventory_location_id(+)
and h.storage_organization_id = j.organization_id(+)
and k.organization_id = e.organization_id
and f.language = userenv('LANG');
select sample_no from gmd_samples
where sampling_event_id = se_id ;
select nvl( text, '')
from wf_Resources where name = 'WF_ADMIN_ROLE' --RLNAGARA B5654562 Changed from WF_ADMIN to WF_ADMIN_ROLE
AND language = userenv('LANG'); -- Added 10/20/2005
select application_id into l_application_id
from fnd_application where application_short_name='GMD';
select user_name into l_user from fnd_user
where user_id = l_owner;
select user_name into l_user from fnd_user
where user_id=Approver.user_id;
select user_name into l_user from fnd_user
where user_id=ame_util.PERSONIDTOUSERID(Approver.person_id);
ame_api.updateApprovalStatus(applicationIdIn => l_application_id,
transactionIdIn => l_event_key,
approverIn => Approver,
transactionTypeIn => l_transaction_type,
forwardeeIn => ame_util.emptyApproverRecord);
select application_id into l_application_id
from fnd_application where application_short_name='GMD';
/*Update the wf_sent column to show that a notification has been sent */
update gmd_ss_time_points
set wf_sent = 'Y'
where time_point_id = l_event_key;
select user_name into l_user from fnd_user
where user_id=Approver.user_id;
select user_name into l_user from fnd_user
where user_id=ame_util.PERSONIDTOUSERID(Approver.person_id);
ame_api.updateApprovalStatus(applicationIdIn => l_application_id,
transactionIdIn => l_event_key,
approverIn => Approver,
transactionTypeIn => l_transaction_type,
forwardeeIn => ame_util.emptyApproverRecord);
/* update the wf_sent back to N */
update gmd_ss_time_points
set wf_sent = 'N'
where time_point_id = p_timepoint;