SELECT 
    A2.XADR_XCMS_ID XCMS_ID, 
    A2.XADR_STREET1 STREET1, 
    A2.XADR_STREET2 STREET2,
    A2.XADR_STREET3 STREET3,
    A2.XADR_CITY CITY,
    A2.XADR_ZIP ZIP,
    C2.XCOU_LONGDESC COUNTRY,
    C2.XCOU_ISO2 COUNTRY_ISO2,
    C2.XCOU_ISO3 COUNTRY_ISO3
FROM XADR A2, XCMS X2, XCOU C2
WHERE A2.XADR_XCMS_ID = {xcms_id}
  AND NVL(A2.XADR_PRIMARY, 0) = 1
  AND A2.XADR_XCMS_ID = X2.XCMS_ID
  AND A2.XADR_XCOU_ID=C2.XCOU_ID