The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT nvl(fc.minimum_accountable_unit,1),
fc.precision
INTO x_min_unit,
x_precision
FROM fnd_currencies fc,
po_headers ph
WHERE ph.po_header_id = X_header_id
AND fc.currency_code = ph.currency_code;
SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
* x_min_unit) / x_min_unit),
x_precision)
into X_po_total
FROM po_line_locations
WHERE po_header_id = X_header_id
AND shipment_type IN ('STANDARD','PLANNED','BLANKET');
SELECT nvl(fc.minimum_accountable_unit,1),
fc.precision
INTO x_min_unit,
x_precision
FROM fnd_currencies fc,
po_headers_archive pha
WHERE pha.po_header_id = X_header_id
AND pha.revision_num = X_revision_num
AND fc.currency_code = pha.currency_code;
SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
* x_min_unit) / x_min_unit),
x_precision)
into X_po_total
FROM po_line_locations_archive plla1
WHERE po_header_id = X_header_id
AND shipment_type IN ('STANDARD','PLANNED','BLANKET')
AND revision_num = (
SELECT
max( plla2.revision_num )
FROM
po_line_locations_archive plla2
WHERE
plla2.revision_num <= X_revision_num
AND plla2.line_location_id = plla1.line_location_id )
;
SELECT nvl(fc.minimum_accountable_unit,1),
fc.precision
INTO x_min_unit,
x_precision
FROM fnd_currencies fc,
po_headers_archive pha,
po_releases_archive pra
WHERE pha.po_header_id = pra.po_header_id
AND pra.po_release_id = X_release_id
AND pha.revision_num = X_revision_num
AND fc.currency_code = pha.currency_code
AND rownum < 2 ;
SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
* x_min_unit) / x_min_unit),
x_precision)
into X_po_total
FROM po_line_locations_archive plla1
WHERE po_release_id = X_release_id
AND shipment_type IN ('STANDARD','PLANNED','BLANKET')
AND revision_num = (
SELECT
max( plla2.revision_num )
FROM
po_line_locations_archive plla2
WHERE
plla2.revision_num <= X_revision_num
AND plla2.line_location_id = plla1.line_location_id )
;
SELECT nvl(fc.minimum_accountable_unit,1),
fc.precision
INTO x_min_unit,
x_precision
FROM fnd_currencies fc,
po_headers ph,
po_releases pr
WHERE ph.po_header_id = pr.po_header_id
AND pr.po_release_id = X_release_id
AND fc.currency_code = ph.currency_code;
SELECT round(((nvl(SUM((quantity - quantity_cancelled) * price_override),0)
* x_min_unit) / x_min_unit),
x_precision)
into X_release_total
FROM po_line_locations
WHERE po_release_id = X_release_id;