SELECT sdorganization.NAME, sdorganization.DESCRIPTION, vendordefinition.contactperson 'Contact Person', aaapostaladdress.DOOR_NO, aaapostaladdress.STREET, aaapostaladdress.LANDMARK, aaapostaladdress.CITY, aaapostaladdress.POSTALCODE, aaapostaladdress.STATE, aaapostaladdress.COUNTRY, aaacontactinfo.EMAILID, aaacontactinfo.LANDLINE, aaacontactinfo.FAX, aaacontactinfo.WEB_URL,currency.currencyname,currency.currencysymbol
FROM Vendordefinition
LEFT JOIN sdorganization ON Vendordefinition.VENDORID=sdorganization.ORG_ID
LEFT JOIN SDOrgContactInfo ON SDOrganization.ORG_ID=SDOrgContactInfo.ORG_ID
LEFT JOIN AaaContactInfo ON SDOrgContactInfo.CONTACTINFO_ID=AaaContactInfo.CONTACTINFO_ID
LEFT JOIN SDOrgPostalAddr ON SDOrganization.ORG_ID=SDOrgPostalAddr.ORG_ID
LEFT JOIN aaapostaladdress ON SDOrgPostalAddr.POSTALADDR_ID=aaapostaladdress.POSTALADDR_ID
left join currency on currency.currencyid = vendordefinition.currencyid