2015年2月1日 星期日

iDempiere 抓取 Oracle ERP View資料 APPS.MRP_AP_CAL_WEEK_START_DATES_V

DROP VIEW APPS.MRP_AP_CAL_WEEK_START_DATES_V;

/* Formatted on 2015/2/1 下午 05:04:47 (QP5 v5.256.13226.35538) */
CREATE OR REPLACE FORCE VIEW APPS.MRP_AP_CAL_WEEK_START_DATES_V
(
   CALENDAR_CODE,
   EXCEPTION_SET_ID,
   WEEK_START_DATE,
   NEXT_DATE,
   PRIOR_DATE,
   SEQ_NUM,
   RN3,
   RN2,
   RN1
)
AS
   SELECT x.CALENDAR_CODE,
          x.EXCEPTION_SET_ID,
          x.WEEK_START_DATE,
          x.NEXT_DATE,
          x.PRIOR_DATE,
          x.SEQ_NUM,
          0 RN3,
          0 RN2,
          0 RN1
     FROM BOM_CAL_WEEK_START_DATES x,
          (SELECT DISTINCT Calendar_Code, Calendar_Exception_Set_ID
             FROM MTL_PARAMETERS mtlp
           UNION
           SELECT DISTINCT
                  Delivery_Calendar Calendar_Code,
                  -1 Calendar_Exception_Set_ID
             FROM PO_ASL_ATTRIBUTES) y
    WHERE     x.Calendar_Code = y.Calendar_Code
          AND x.Exception_Set_ID = y.Calendar_Exception_Set_ID;

沒有留言:

張貼留言