The following lines contain the word 'select', 'insert', 'update' or 'delete':
select disposition
from
--po_headers_all poh,
--po_lines_all pol,
--po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where
-- segment1 = p_po_num
--and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_po_line_num
--and pol.line_num = p_po_line_num
--and poh.po_header_id = rsl.po_header_id
--and poll.shipment_num = p_shipment_num
--and poll.po_line_id = pol.po_line_id
--and poll.line_location_id = rcv.po_line_location_id
rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = p_shipment_line_id
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc; */
select disposition
from
po_headers_all poh,
po_lines_all pol,
po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where
segment1 = p_po_num
and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_shipment_num --p_po_line_num - CHANGED FOR 14249028 take this out
and pol.line_num = p_po_line_num
and poh.po_header_id = rsl.po_header_id
and poll.shipment_num = p_shipment_num
and poll.po_line_id = pol.po_line_id
and poll.line_location_id = rcv.po_line_location_id
and rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = rsl.shipment_line_ID-- new line for both bugs 14249028 and 13980338
and rcv.shipment_line_ID = p_shipment_line_id
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc;
select rcv.quantity
from
--po_headers_all poh,
--po_lines_all pol,
--po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where
-- segment1 = p_po_num
--and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_po_line_num
--and pol.line_num = p_po_line_num
--and poh.po_header_id = rsl.po_header_id
--and poll.shipment_num = p_shipment_num
--and poll.po_line_id = pol.po_line_id
--and poll.line_location_id = rcv.po_line_location_id
rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = p_shipment_line_id
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc; */
select rcv.quantity
from
po_headers_all poh,
po_lines_all pol,
po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where
segment1 = p_po_num
and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_shipment_num --p_po_line_num - CHANGED FOR 14249028
and pol.line_num = p_po_line_num
and poh.po_header_id = rsl.po_header_id
and poll.shipment_num = p_shipment_num
and poll.po_line_id = pol.po_line_id
and poll.line_location_id = rcv.po_line_location_id
and rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = rsl.shipment_line_ID-- new line for both bugs 14249028 and 13980338
and rcv.shipment_line_ID = p_shipment_line_id
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc;
select disposition
from
--po_headers_all poh,
--po_lines_all pol,
--po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where
-- segment1 = p_po_num
--and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_po_line_num
--and pol.line_num = p_po_line_num
--and poh.po_header_id = rsl.po_header_id
--and poll.shipment_num = p_shipment_num
--and poll.po_line_id = pol.po_line_id
--and poll.line_location_id = rcv.po_line_location_id
rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = p_shipment_line_id
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc; */
select disposition
from
po_headers_all poh,
po_lines_all pol,
po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where
segment1 = p_po_num
and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_shipment_num --p_po_line_num - CHANGED FOR 14249028
and pol.line_num = p_po_line_num
and poh.po_header_id = rsl.po_header_id
and poll.shipment_num = p_shipment_num
and poll.po_line_id = pol.po_line_id
and poll.line_location_id = rcv.po_line_location_id
and rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = rsl.shipment_line_ID-- new line for both bugs 14249028 and 13980338
and rcv.shipment_line_ID = p_shipment_line_id
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc;
SELECT substr(rtrim(displayed_field),1,10)
FROM po_lookup_codes
WHERE lookup_type = 'ERT RESULTS ACTION'
and lookup_code = l_lkup; /* 'ACCEPT' or 'REJECT' */
select plan_id from qa_plans where name = p_plan_name;
select sampling_event_id
from
po_headers_all poh,
po_lines_all pol,
po_line_locations_all poll,
rcv_transactions rcv ,
gmd_sampling_events se,
rcv_shipment_lines rsl,
rcv_shipment_headers rsh
where segment1 = p_po_num
and poh.po_header_id = pol.po_header_id
--and rsl.line_num = p_shipment_num --p_po_line_num - CHANGED FOR 14249028
and pol.line_num = p_po_line_num
and poh.po_header_id = rsl.po_header_id
and poll.shipment_num = p_shipment_num
and poll.po_line_id = pol.po_line_id
and poll.line_location_id = rcv.po_line_location_id
and rcv.shipment_header_id = rsh.shipment_header_id
and se.receipt_id = rsh.shipment_header_id
and se.receipt_line_id = rsl.shipment_line_id
and rsl.shipment_header_id = rsh.shipment_header_id
and rcv.shipment_line_ID = rsl.shipment_line_ID-- new line for both bugs 14249028 and 13980338
--and rsh.RECEIPT_NUM = p_receipt_num
order by rcv.creation_date desc;
update gmd_sampling_events
set
plan_id = l_plan_id,
occurrence = p_occurrence,
collection_id = p_collection_id,
LAST_UPDATE_DATE = sysdate,
LAST_UPDATED_BY = fnd_global.user_id,
LAST_UPDATE_LOGIN = fnd_global.login_id
where sampling_event_id = l_id;