SELECT DISTINCT GROUP_BU FROM PS_GROUP_CONTROL WHERE POST_ACTION IN ('N', 'L') UNION SELECT DISTINCT WS_BU FROM PS_WS_CONTROL WHERE POST_ACTION IN ('N', 'L') AND CREATE_DST_BATCH = 'Y' UNION SELECT DISTINCT TRN_BU FROM PS_TRN_CONTROL WHERE POST_ACTION IN ('N', 'L') AND CREATE_DST_BATCH = 'Y' UNION SELECT DISTINCT DD_BU FROM PS_DD_CONTROL WHERE CREATE_PEND_ITEMS = 'L' UNION SELECT DISTINCT DRAFT_BU FROM PS_DR_CNTL_INQ_VW WHERE CREATE_PEND_ITEMS IN ('L', 'N') UNION SELECT DISTINCT GROUP_BU FROM PS_GRP_PY_POST_VW UNION SELECT DISTINCT GROUP_BU FROM PS_PYMT_POST_VW UNION SELECT DISTINCT DD_BU FROM PS_DD_CONTROL WHERE EXISTS ( SELECT 'x' FROM ps_group_control WHERE group_bu = ps_dd_control.dd_bu AND (group_id = ps_dd_control.dd_remit_group_id OR group_id = ps_dd_control.transit_group_id OR group_id = ps_dd_control.group_id OR group_id = ps_dd_control.dd_cancel_group_id OR group_id = ps_dd_control.cash_group_id) AND post_action IN ('N', 'L'))
|