Mapping with no sessions

Displays mappings that do not have any sessions defined by repository and folder.

Click on the text to copy the query report to your clipboard.


select "MAPPING_VERSION_NUMBER",
"MAPPING_DESCRIPTION",
"SESSION_ID",
case when ("VALIDFLAG" = 1) then ('Yes') else ('No') end as "Calc_ValidFlag",
"MAPPING_LAST_SAVED",
"SUBJECT_AREA",
"MAPPING_NAME",
case when ("MAPPING_VERSION_STATUS" = 0) then ('Active') else (case when ("MAPPING_VERSION_STATUS" = 9) then ('Logically Deleted') else (case when ("MAPPING_VERSION_STATUS" = 10) then ('Physically Deleted') else ('') end) end) end as "Calc_MAPPING_VERSION_STATUS",
"REPOSITORY_NAME",
case when ("SHORTCUTFLAG" = 1) then ('Yes') else ('No') end as "Calc_ShortcutFlag"
from (SELECT  MAPPING_REPOSIT_INFO.REPOSITORY_NAME,  ALL_MAPPINGS.SUBJECT_AREA,  ALL_MAPPINGS.MAPPING_NAME,  ALL_MAPPINGS.MAPPING_DESCRIPTION        AS MAPPING_DESCRIPTION,  ALL_MAPPINGS.MAPPING_VERSION_NUMBER,  ALL_MAPPINGS.MAPPING_VERSION_STATUS,  ALL_MAPPINGS.MAPPING_LAST_SAVED,  ALL_MAPPINGS.IS_SHORTCUT as SHORTCUTFLAG,  ALL_MAPPINGS.PARENT_SUBJECT_AREA ,  ALL_MAPPINGS.PARENT_MAPPING_NAME ,  ALL_MAPPINGS.PARENT_MAPPING_DESCRIPTION AS PARENT_MAPPING_DESCRIPTION,  ALL_MAPPINGS.PARENT_MAPPING_VERSION_NUMBER ,  ALL_MAPPINGS.PARENT_MAPPING_VERSION_STATUS ,  ALL_MAPPINGS.PARENT_MAPPING_LAST_SAVED ,  ALL_MAPPINGS.PARENT_MAPPING_IS_VALID as VALIDFLAG,  (COUNT(DISTINCT(MAPPING_SESS_PARTITION_DEF.SESSION_ID)))        AS SESSION_ID  FROM  REP_REPOSIT_INFO MAPPING_REPOSIT_INFO,  REP_ALL_MAPPINGS ALL_MAPPINGS    LEFT OUTER JOIN REP_SESS_PARTITION_DEF MAPPING_SESS_PARTITION_DEF    ON ALL_MAPPINGS.PARENT_MAPPING_ID = MAPPING_SESS_PARTITION_DEF.   MAPPING_ID  WHERE  (ALL_MAPPINGS.PARENT_MAPPING_ID <> MAPPING_REPOSIT_INFO.REPOSITORY_ID)  GROUP BY  MAPPING_REPOSIT_INFO.REPOSITORY_NAME,  ALL_MAPPINGS.SUBJECT_AREA,  ALL_MAPPINGS.MAPPING_NAME,  ALL_MAPPINGS.MAPPING_DESCRIPTION,  ALL_MAPPINGS.MAPPING_VERSION_NUMBER,  ALL_MAPPINGS.MAPPING_VERSION_STATUS,  ALL_MAPPINGS.IS_SHORTCUT,  ALL_MAPPINGS.PARENT_SUBJECT_AREA ,  ALL_MAPPINGS.PARENT_MAPPING_NAME ,  ALL_MAPPINGS.PARENT_MAPPING_DESCRIPTION ,  ALL_MAPPINGS.PARENT_MAPPING_VERSION_NUMBER ,  ALL_MAPPINGS.PARENT_MAPPING_VERSION_STATUS ,  ALL_MAPPINGS.PARENT_MAPPING_LAST_SAVED ,  ALL_MAPPINGS.PARENT_MAPPING_IS_VALID,  ALL_MAPPINGS.MAPPING_LAST_SAVED) "query"
where "SUBJECT_AREA" in ('<Folder_Name>') and "SESSION_ID" = 0
order by "REPOSITORY_NAME", "SUBJECT_AREA"

Leave a Comment

Your email address will not be published. Required fields are marked *

*
*