
rem -----------------------------------------------------+
prompt Creating version-resolved views for SDW objects
rem -----------------------------------------------------+

rem -----------------------------------------------------+
prompt View : sdw_access_rights
rem -----------------------------------------------------+
rem
create or replace view sdw_access_rights (
  irid
 ,ivid
 ,AR_DEL_ALLW
 ,AR_INS_ALLW
 ,AR_SEL_ALLW
 ,AR_SHR_ALLW
 ,AR_UPD_ALLW
 ,AR_USR_GRANTED_TO
 ,AR_APPID_FOR
 ,AR_APPID_WITHIN 
 ,AR_CMU_NAME
 ,AR_COMMENT
 ,AR_ET_ID
 ,AR_MODE
 ,AR_OPT_SEQ_NO
 ,AR_USR_GRANTED_BY
 ,AR_ADMIN_ALLW
) as
select
  irid
 ,ivid
 ,AR_DEL_ALLW
 ,AR_INS_ALLW
 ,AR_SEL_ALLW
 ,AR_SHR_ALLW
 ,AR_UPD_ALLW
 ,AR_USR_GRANTED_TO
 ,AR_APPID_FOR
 ,AR_APPID_WITHIN 
 ,AR_CMU_NAME
 ,AR_COMMENT
 ,AR_ET_ID
 ,AR_MODE
 ,AR_OPT_SEQ_NO
 ,AR_USR_GRANTED_BY
 ,AR_ADMIN_ALLW
from i$sdw_access_rights
where ivid=1
/

rem -----------------------------------------------------+
prompt View : sdw_users
rem -----------------------------------------------------+
rem
create or replace view sdw_users (
  irid
 ,ivid
 ,USR_FULL_USER_NAME
 ,USR_ORACLE_USERNAME 
 ,USR_DATABASE_TYPE
 ,USR_DATE_SET_UP
 ,USR_DESC
 ,USR_GRANT_IND
 ,USR_GROUP
 ,USR_PREF_AS_REF
 ,USR_ROLE_TYPE
 ,USR_SDD_OWNER
 ,USR_SEQ_STEP
 ,USR_TYPE
 ,USR_WORK_CLASS
 ,USR_STATUS
) as
select
  irid
 ,ivid
 ,USR_FULL_USER_NAME
 ,USR_ORACLE_USERNAME 
 ,USR_DATABASE_TYPE
 ,USR_DATE_SET_UP
 ,USR_DESC
 ,USR_GRANT_IND
 ,USR_GROUP
 ,USR_PREF_AS_REF
 ,USR_ROLE_TYPE
 ,USR_SDD_OWNER
 ,USR_SEQ_STEP
 ,USR_TYPE
 ,USR_WORK_CLASS
 ,USR_STATUS
from i$sdw_users
where ivid=1
/

rem -----------------------------------------------------+
prompt View : sdw_valid_structure_elements
rem -----------------------------------------------------+
rem
create or replace view sdw_valid_structure_elements (
  irid
 ,ivid
 ,VSL_FOR_MATRIX_DIAGRAMMER
 ,VSL_PART_OF
 ,VSL_TYPE
 ,VSL_USE_OF
 ,VSL_COMMENT
 ,VSL_RULE_FOR_DELETE
 ,VSL_RULE_FOR_INSERTION
 ,VSL_RULE_FOR_UPDATE
 ,VSL_CDI_ONLY 
 ,VSL_PART_DEGREE
 ,VSL_USE_DEGREE
 ,VSL_PART_TYPE
 ,VSL_PART_TYPE_DEGREE
 ,VSL_USE_3D
) as
select
  irid
 ,ivid
 ,VSL_FOR_MATRIX_DIAGRAMMER
 ,VSL_PART_OF
 ,VSL_TYPE
 ,VSL_USE_OF
 ,VSL_COMMENT
 ,VSL_RULE_FOR_DELETE
 ,VSL_RULE_FOR_INSERTION
 ,VSL_RULE_FOR_UPDATE
 ,VSL_CDI_ONLY 
 ,VSL_PART_DEGREE
 ,VSL_USE_DEGREE
 ,VSL_PART_TYPE
 ,VSL_PART_TYPE_DEGREE
 ,VSL_USE_3D
from i$sdw_valid_structure_elements
where ivid=1
/


