//R12 Supplier simple data
select hou.name, pv.vendor_id, pv.segment1, pv.vendor_name, vs.vendor_site_code,vs.PURCHASING_SITE_FLAG, vs.ATTRIBUTE1, pv.creation_date, vs.creation_date
from apps.ap_suppliers pv, ap_supplier_sites_all vs, hr_all_organization_units hou
where –vs.last_updated_by = ‘11704’
pv.vendor_id = vs.vendor_id
AND hou.name =’PG OU’ –in (‘AU OU’,’NZ OU’,’PG OU’,’FJ OU’)
AND vs.org_id = hou.organization_id
AND vs.PURCHASING_SITE_FLAG = ‘N’
AND pv.vendor_type_lookup_code = ‘INTERCOMPANY’
AND vs.INACTIVE_DATE IS NULL
–AND vs.ATTRIBUTE1 IS NOT NULL
–and vs.org_id =143
order by 1,3,4;