SELECT A.BUSINESS_UNIT , ( SELECT C.SETID FROM PS_SET_CNTRL_REC C WHERE C.SETCNTRLVALUE = A.BUSINESS_UNIT AND C.REC_GROUP_ID = 'FS_24' AND C.RECNAME = 'CNTRCT_HDR') AS CNTRCT_SETID , ( SELECT I.SETID FROM PS_SET_CNTRL_REC I WHERE I.SETCNTRLVALUE = A.BUSINESS_UNIT_IN AND I.REC_GROUP_ID = 'FS_18' AND I.RECNAME = 'MASTER_ITEM_TBL') AS ITM_SETID , ( SELECT V.SETID FROM PS_SET_CNTRL_REC V WHERE V.SETCNTRLVALUE = A.BUSINESS_UNIT AND V.REC_GROUP_ID = 'FS_38' AND V.RECNAME = 'VENDOR') AS VENDOR_SETID FROM PS_BUS_UNIT_TBL_WM A
|