SELECT DISTINCT a.business_unit , e.oprclass , a.order_no FROM ps_cp_opt_hdr a , PS_ORD_SCHEDULE b , ps_ord_line c , ps_bus_unit_tbl_fs d , ps_sec_bu_cls e WHERE ((a.mfg_process_flg IN ('B','E') AND a.production_id <> ' ') OR a.mfg_process_flg = 'C') AND a.business_unit = b.business_unit AND b.business_unit = c.business_unit AND c.business_unit = d.business_unit AND d.business_unit = e.business_unit AND a.order_no = b.order_no AND a.order_no = c.order_no AND b.order_no = c.order_no AND a.order_int_line_no = b.order_int_line_no AND a.order_int_line_no = c.order_int_line_no AND b.order_int_line_no = c.order_int_line_no AND b.demand_sent = 'Y' AND a.cp_mode = 'S' AND c.ord_line_status = 'O'
|