List of Vendor Sites with no invoices, no PO's

Select sites.vendor_site_id,
vend.segment1 Vendor#,
vendor_name,
sites.vendor_site_code,
vend.end_date_active VEND_INACTIVE,
sites.inactive_date SITE_INACTIVE
from po_vendor_sites_all sites,
po_vendors vend,
ap_invoices_all inv,
po_headers_all PO
where vend.vendor_id = sites.vendor_id
and sites.vendor_site_id = inv.vendor_site_id(+)
and inv.vendor_site_id is null
and sites.vendor_site_id = po.vendor_site_id(+)
and po.vendor_site_id is null
and sites.inactive_date < sysdate
order by vendor_name, vendor_site_code;

0 comments:

Post a Comment