SELECT pv.vendor_name,
pv.segment1 vendor_number,
pvs.vendor_site_code,
pvs.ADDRESS_LINE1,
pvs.ADDRESS_LINE2,
pvs.ADDRESS_LINE3,
pvs.state,
pvs.City,
pvs.zip,
pvs.country,
hou.NAME OU
FROM apps.po_vendors pv,
apps.po_vendor_sites_all pvs,
apps.hr_operating_units hou
WHERE pv.vendor_id = pvs.vendor_id
AND pvs.org_id = hou.organization_id
AND pv.ENABLED_FLAG = 'Y'
AND NVL (pv.END_DATE_ACTIVE, SYSDATE + 1) >= SYSDATE
AND NVL (pvs.INACTIVE_DATE, SYSDATE + 1) >= SYSDATE
AND pvs.country = 'US'
AND TRANSLATE (zip,
CHR (0) || '0123456789-' || CHR (9),
CHR (0))
IS NOT NULL
ORDER BY pvs.org_id, pv.vendor_name
pv.segment1 vendor_number,
pvs.vendor_site_code,
pvs.ADDRESS_LINE1,
pvs.ADDRESS_LINE2,
pvs.ADDRESS_LINE3,
pvs.state,
pvs.City,
pvs.zip,
pvs.country,
hou.NAME OU
FROM apps.po_vendors pv,
apps.po_vendor_sites_all pvs,
apps.hr_operating_units hou
WHERE pv.vendor_id = pvs.vendor_id
AND pvs.org_id = hou.organization_id
AND pv.ENABLED_FLAG = 'Y'
AND NVL (pv.END_DATE_ACTIVE, SYSDATE + 1) >= SYSDATE
AND NVL (pvs.INACTIVE_DATE, SYSDATE + 1) >= SYSDATE
AND pvs.country = 'US'
AND TRANSLATE (zip,
CHR (0) || '0123456789-' || CHR (9),
CHR (0))
IS NOT NULL
ORDER BY pvs.org_id, pv.vendor_name
No comments:
Post a Comment