SELECT A.EVENT_TYPE , A.EVENT_CATEGORY , B.SERVICE_GROUP_ID , B.USERID , B.USER_ORDER_TYPE , C.APPLY_ALL_PB FROM PS_FO_EVENTS_SETUP A , PS_FO_SVC_EVNT_TBL B , PS_FO_SVC_ORD_TBL C WHERE A.EVENT='TMP' AND A.EVENT_TYPE = B.EVENT_TYPE AND B.SERVICE_GROUP_ID = C.SERVICE_GROUP_ID AND B.USERID = C.USERID AND B.USER_ORDER_TYPE = C.USER_ORDER_TYPE UNION SELECT C.EVENT_TYPE , A.EVENT_CATEGORY , B.SERVICE_GROUP_ID , B.USERID , B.USER_ORDER_TYPE , D.APPLY_ALL_PB FROM PS_FO_EVENTS_SETUP A , PS_FO_SVC_PRCS_TBL B , PS_FO_EVENTS_PROC C , PS_FO_SVC_ORD_TBL D WHERE A.EVENT='TMP' AND A.EVENT_TYPE = B.FO_EVNT_PRCS AND B.FO_EVNT_PRCS = C.FO_EVNT_PRCS AND B.SERVICE_GROUP_ID = D.SERVICE_GROUP_ID AND B.USERID = D.USERID AND B.USER_ORDER_TYPE = D.USER_ORDER_TYPE UNION SELECT A.EVENT_TYPE , A.EVENT_CATEGORY , B.SERVICE_GROUP_ID , B.USERID , B.USER_ORDER_TYPE , C.APPLY_ALL_PB FROM PS_FO_EVENTS_SETUP A , PS_FO_SVC_CAT_TBL B , PS_FO_SVC_ORD_TBL C WHERE A.EVENT='TMP' AND A.EVENT_CATEGORY = B.EVENT_CATEGORY AND B.SERVICE_GROUP_ID = C.SERVICE_GROUP_ID AND B.USERID = C.USERID AND B.USER_ORDER_TYPE = C.USER_ORDER_TYPE
|