SELECT A.SETID , A.MFG_ID , A.MODEL , COALESCE(WT.IN_USE_FLAG , PM.IN_USE_FLAG , PR.IN_USE_FLAG , TM.IN_USE_FLAG , IP.IN_USE_FLAG , 'N') FROM PS_MFG_MODEL A LEFT OUTER JOIN PS_WM_MOD_WOTLS_VW WT ON WT.SETID = A.SETID AND WT.MFG_ID = A.MFG_ID AND WT.MODEL = A.MODEL LEFT OUTER JOIN PS_WM_MOD_PMSCH_VW PM ON PM.SETID = A.SETID AND PM.MFG_ID = A.MFG_ID AND PM.MODEL = A.MODEL LEFT OUTER JOIN PS_WM_MOD_PRBLM_VW PR ON PR.SETID = A.SETID AND PR.MFG_ID = A.MFG_ID AND PR.MODEL = A.MODEL LEFT OUTER JOIN PS_WM_MOD_TMPLT_VW TM ON TM.SETID = A.SETID AND TM.MFG_ID = A.MFG_ID AND TM.MODEL = A.MODEL LEFT OUTER JOIN PS_WM_MOD_INSPL_VW IP ON IP.SETID = A.SETID AND IP.MFG_ID = A.MFG_ID AND IP.MODEL = A.MODEL
|