SELECT segment1 Supplier_Number,
vendor_name Supplier_Name
FROM ap_suppliers a,
(SELECT vendor_id
FROM rcv_transactions
WHERE transaction_type = 'RECEIVE'
AND transaction_date > '01-APR-2018'
GROUP BY vendor_id) b
WHERE a.vendor_id = b.vendor_id(+)
AND b.vendor_id IS NULL
AND Nvl (a.enabled_flag, 'Y') = 'Y'
AND end_date_active IS NULL;
--Query to Verify Output
SELECT *
FROM rcv_shipment_headers
WHERE creation_date >= To_date ('2018/04/01 00:00:00', 'YYYY/MM/DD HH24:MI:SS')
AND vendor_id IN (SELECT a.vendor_id
FROM ap_suppliers a,
(SELECT vendor_id
FROM rcv_transactions
WHERE transaction_type = 'RECEIVE'
AND transaction_date > '01-APR-2018'
GROUP BY vendor_id) b
WHERE a.vendor_id = b.vendor_id(+)
AND b.vendor_id IS NULL
AND Nvl (a.enabled_flag, 'Y') = 'Y'
AND end_date_active IS NULL);
No comments:
Post a Comment