2012年11月18日 星期日

-- Albert 出招--

-- 如何調教出 超越 Oracle EBS MRP  
--
SELECT  --- /*+PARALLEL */
                TRUNC(sn.promise_date+1,'WW'),
                sn.schedule_ship_date,sn.organization_id, sn.inventory_item_id,
                -- mp.organization_id,
                -- a.segment1 AS inventory_item,
                -- oh.order_number|| '-' ||ol.line_number|| '.' || shipment_number AS order_number,
                (NVL (sn.ordered_quantity, 0) - NVL (sn.shipped_quantity, 0)) AS quantity
 FROM oe_odr_lines_sn sn
WHERE EXISTS(SELECT 1 FROM oe_order_lines_all ol
                            WHERE ol.line_id = sn.line_id
                              AND ol.flow_status_code = 'AWAITING_SHIPPING'
                              AND TRUNC (ol.schedule_ship_date) < TRUNC (SYSDATE, 'WW')) --  + 6

沒有留言:

關於我自己

我的相片
Skype:ADempiere/Compiere MSN:albert_a_chen@yahoo.com