[Oracle]檢查 系統參數&CodeType是否有同步

摘要:[oracle]檢查 系統參數&CodeType是否有同步

檢察系統參數&CodeType是否有同布

-----------------------System_Setting----------------------------

Select  A.Setting_Category,A.Setting_Id,A.REMARK,
        (Case When Wcm.Setting_Category IS NULL Then 'N' Else 'Y' End) As WMS,
        (case when LCM.SETTING_CATEGORY IS NULL THEN 'N' ELSE 'Y' END) AS LMS
  FROM (
    SELECT * FROM 
    (
      Select Setting_Category,Setting_Id,REMARK From Wms_Owner.System_Setting_Master Wsm
      left join WMS_OWNER.SYSTEM_SETTING_DETAIL WSD ON (WSD.SETTING_MASTER_KEY = WSM.SETTING_MASTER_KEY AND WSD.CULTURE_INFO_LCID='1028' )
      Union All
      Select Setting_Category,Setting_Id,REMARK From Lms_Owner.System_Setting_Master Lsm
      left join LMS_OWNER.SYSTEM_SETTING_DETAIL LSD ON (LSD.SETTING_MASTER_KEY = LSM.SETTING_MASTER_KEY AND LSD.CULTURE_INFO_LCID='1028')
    ) 
    GROUP BY SETTING_CATEGORY,SETTING_ID,REMARK
  ) A
  Left Join Wms_Owner.System_Setting_Master Wcm On (A.Setting_Id= Wcm.Setting_Id And A.Setting_Category = Wcm.Setting_Category)
  Left Join Lms_Owner.System_Setting_Master Lcm On (A.Setting_Id= Lcm.Setting_Id And A.Setting_Category = lcm.Setting_Category)
  order by a.Setting_Category
;

 

 

-----------------------CodeType----------------------------

SELECT  A.CODE_TYPE,A.CODE_MEMO,
        (case when WCM.CODE_TYPE=NULL THEN 'N' ELSE 'Y' END) AS WMS,
        (case when LCM.CODE_TYPE=NULL THEN 'N' ELSE 'Y' END) AS LMS
  FROM (
    SELECT * FROM 
    (
      SELECT CODE_TYPE,CODE_MEMO FROM WMS_OWNER.CODE_MASTER
      UNION ALL
      SELECT CODE_TYPE,CODE_MEMO FROM LMS_OWNER.CODE_MASTER
    ) 
    GROUP BY CODE_TYPE,CODE_MEMO
  ) A
  LEFT JOIN WMS_OWNER.CODE_MASTER WCM ON (A.CODE_TYPE= WCM.CODE_TYPE)
  LEFT JOIN LMS_OWNER.CODE_MASTER LCM ON (A.CODE_TYPE= LCM.CODE_TYPE)
;