SELECT HDR.CONTRACT_NUM , DTL.CONTRACT_LINE_NUM , SP.LANGUAGE_CD , SP.DESCR FROM PS_CA_CONTR_HDR HDR , PS_CA_DETAIL DTL , PS_GM_SP_LOC_LNG SP , PS_SET_CNTRL_REC SC , PS_CUSTOMER CU WHERE HDR.CONTRACT_NUM = DTL.CONTRACT_NUM AND SC.SETCNTRLVALUE = HDR.BUSINESS_UNIT AND SC.RECNAME = 'CUSTOMER' AND CU.SETID = SC.SETID AND CU.CUST_ID = HDR.SOLD_TO_CUST_ID AND SP.SETID = SC.SETID AND SP.CUST_ID = HDR.SOLD_TO_CUST_ID AND SP.LOC_REFERENCE_ID = HDR.LOC_REFERENCE_ID AND DTL.LOC_DOC_ID <> ' ' AND HDR.CA_STATUS = 'ACTIVE' AND DTL.LOC_DOC_INACTIVE = 'N'
|