SELECT DISTINCT d.business_unit , d.req_id , d.line_nbr FROM ps_req_ln_distrib d , ps_req_line_ship s , ps_req_line l , PS_REQ_HDR h WHERE h.hold_status = 'N' AND l.business_unit = h.business_unit AND l.req_id = h.req_id AND l.curr_status IN ('A', 'O') AND s.business_unit = l.business_unit AND s.req_id = l.req_id AND s.line_nbr = l.line_nbr AND d.business_unit_in <> ' ' AND d.distrib_ln_status = 'O' AND d.qty_open_std > 0 AND d.business_unit = s.business_unit AND d.req_id = s.req_id AND d.line_nbr = s.line_nbr AND d.sched_nbr = s.sched_nbr
|