I need list of all vendors. with this I am getting some duplicate any help plz
SELECT
distinct pv.vendor_id,
pv.vendor_name ,
pvs.address_line1,
pvs.address_line2,
pvs.address_line3,
pvs.city ,
pvs. state,
pvs.zip
FROM po.po_vendors pv , apps.po_vendor_sites pvs
WHERE pv.vendor_id = pvs.vendor_id
and pvs.pay_site_flag = 'Y'
and pv.enabled_flag = 'Y'
and pv.VENDOR_TYPE_LOOKUP_CODE = 'VENDOR'
order by 2
SELECT
distinct pv.vendor_id,
pv.vendor_name ,
pvs.address_line1,
pvs.address_line2,
pvs.address_line3,
pvs.city ,
pvs. state,
pvs.zip
FROM po.po_vendors pv , apps.po_vendor_sites pvs
WHERE pv.vendor_id = pvs.vendor_id
and pvs.pay_site_flag = 'Y'
and pv.enabled_flag = 'Y'
and pv.VENDOR_TYPE_LOOKUP_CODE = 'VENDOR'
order by 2