SELECT SETID , DESCR , DESCRSHORT , DESCRLONG FROM PS_SETID_TBL WHERE (EXISTS ( SELECT 'X' FROM PS_SDN_SRCH_SETUP WHERE SCM_FSS_OPTION = '1') OR EXISTS ( SELECT 'Y' FROM PS_SDN_SRCH_SETUP A , PS_FSS_BU_OM_VW B , PS_SET_CNTRL_REC C WHERE A.SCM_FSS_OPTION = '2' AND B.BUSINESS_UNIT = C.SETCNTRLVALUE AND C.RECNAME = 'CUSTOMER' AND C.SETID = PS_SETID_TBL.SETID) OR EXISTS ( SELECT 'Y' FROM PS_SDN_SRCH_SETUP A , PS_FSS_BU_IN_VW B , PS_SET_CNTRL_REC C WHERE A.SCM_FSS_OPTION = '2' AND B.BUSINESS_UNIT = C.SETCNTRLVALUE AND C.RECNAME = 'CUSTOMER' AND C.SETID = PS_SETID_TBL.SETID) OR EXISTS ( SELECT 'Y' FROM PS_SDN_SRCH_SETUP A , PS_BI_BU_FSS_VW B , PS_SET_CNTRL_REC C WHERE A.SCM_FSS_OPTION = '2' AND B.BUSINESS_UNIT = C.SETCNTRLVALUE AND C.RECNAME = 'CUSTOMER' AND C.SETID = PS_SETID_TBL.SETID))
|