SELECT H.BUSINESS_UNIT , H.INVOICE_ID , PL.LANGUAGE_CD , PL.DESCRSHORT , VL1.DESCR FROM PS_SPF_INVOICE_HDR H , PS_PYMT_TR_HD_LANG PL , PS_VNDR_ADDRSCR_LG VL1 , PS_VNDR_ADDRSCR_LG VL2 WHERE PL.SETID = ( SELECT R.SETID FROM PS_SET_CNTRL_GROUP R WHERE R.SETCNTRLVALUE = H.BUSINESS_UNIT AND R.REC_GROUP_ID = 'FS_14') AND H.PYMNT_TERMS_CD = PL.PYMNT_TERMS_CD AND PL.LANGUAGE_CD = VL1.LANGUAGE_CD AND H.VENDOR_ID = VL1.VENDOR_ID AND H.ADDRESS_SEQ_NUM = VL1.ADDRESS_SEQ_NUM AND VL1.SETID = ( SELECT S.SETID FROM PS_SET_CNTRL_GROUP S WHERE S.SETCNTRLVALUE = H.BUSINESS_UNIT AND S.REC_GROUP_ID = 'FS_38') AND VL1.SETID = VL2.SETID AND VL1.LANGUAGE_CD = VL2.LANGUAGE_CD AND VL2.VENDOR_ID = H.REMIT_VENDOR AND VL2.ADDRESS_SEQ_NUM = H.REMIT_ADDR_SEQ_NUM
|