prompt Creating view RM_ACTIVITIES...
CREATE OR REPLACE FORCE VIEW rm_activities AS
SELECT rm$act.changed_by
      ,rm$act.close_end_time
      ,rm$act.close_start_time
      ,rm$act.created_by
      ,rm$act.date_changed
      ,rm$act.date_created
      ,rm$act.depth
      ,rm$act.id
      ,rm$act.label
      ,rm$act.number_of_times_modified
      ,rm$act.open_child
      ,rm$act.open_parent
      ,rm$act.open_time
      ,rm$act.parent
      ,rm$act.readonly
      ,rm$act.session_label
      ,rm$act.status
      ,rm$act.types
FROM   rm$activities rm$act
WITH CHECK OPTION
/
prompt Creating view RM_ASSERTIONS...
CREATE OR REPLACE FORCE VIEW rm_assertions AS
SELECT rm$ass.changed_by
      ,rm$ass.classification
      ,rm$ass.code
      ,rm$ass.created_by
      ,rm$ass.date_changed
      ,rm$ass.date_created
      ,rm$ass.deferred
      ,rm$ass.defined_against
      ,rm$ass.enabled
      ,rm$ass.expression
      ,rm$ass.facility
      ,rm$ass.generated
      ,rm$ass.hack_default
      ,rm$ass.id
      ,rm$ass.message_usage
      ,rm$ass.name
      ,rm$ass.number_of_times_modified
      ,rm$ass.of_domain
      ,rm$ass.plural_name
      ,rm$ass.product
      ,rm$ass.property
      ,rm$ass.short_name
      ,rm$ass.source_ref
      ,rm$ass.supertypes
      ,rm$ass.types
      ,rm$ass.user_extension
      ,rm$ass.warning
FROM   rm$assertions rm$ass
WITH CHECK OPTION
/
prompt Creating view RM_DATA_TYPES...
CREATE OR REPLACE FORCE VIEW rm_data_types AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.p01 data_length
      ,rm$1.p02 data_precision
      ,rm$1.p03 data_scale
      ,rm$1.a09 data_type
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a10 mandatory
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.a11 text_type_code
      ,rm$1.ty types
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty = 41
WITH CHECK OPTION
/
prompt Creating view RM_DEFERRED_CHECKS...
CREATE OR REPLACE FORCE VIEW rm_deferred_checks AS
SELECT rm$def.activity
      ,rm$def.assertion
      ,rm$def.changed_by
      ,rm$def.created_by
      ,rm$def.date_changed
      ,rm$def.date_created
      ,rm$def.element
      ,rm$def.id
      ,rm$def.number_of_times_modified
      ,rm$def.syntax
      ,rm$def.types
FROM   rm$deferred_checks rm$def
WITH CHECK OPTION
/
prompt Creating view RM_DEFERRED_QUERIES...
CREATE OR REPLACE FORCE VIEW rm_deferred_queries AS
SELECT rm$de1.assertion
      ,rm$de1.changed_by
      ,rm$de1.created_by
      ,rm$de1.date_changed
      ,rm$de1.date_created
      ,rm$de1.element
      ,rm$de1.element_type
      ,rm$de1.id
      ,rm$de1.number_of_times_modified
      ,rm$de1.types
FROM   rm$deferred_queries rm$de1
WITH CHECK OPTION
/
prompt Creating view RM_DISPLAY_DETAILS...
CREATE OR REPLACE FORCE VIEW rm_display_details AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.a06 data_type
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.n03 for_type
      ,rm$1.n04 height
      ,rm$1.a07 help
      ,rm$1.a08 hint
      ,rm$1.id
      ,rm$1.a09 justify
      ,rm$1.a10 label
      ,rm$1.n05 length
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.n06 precision
      ,rm$1.n07 sequence
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.ty types
      ,rm$1.n08 width
FROM   rm$1 rm$1
WHERE  rm$1.ty = 27
WITH CHECK OPTION
/
prompt Creating view RM_ELEMENT_TYPES...
CREATE OR REPLACE FORCE VIEW rm_element_types AS
SELECT rm$1.a09 abstract
      ,rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.n04 primary_row_type
      ,rm$1.a07 product
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.ty types
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty = 8
WITH CHECK OPTION
/
prompt Creating view RM_ELEMENTS...
CREATE OR REPLACE FORCE VIEW rm_elements AS
SELECT sdd_a1.changed_by
      ,sdd_a1.created_by
      ,sdd_a1.date_changed
      ,sdd_a1.date_created
      ,sdd_a1.irid id
      ,sdd_a1.notm number_of_times_modified
      ,sdd_a1.types
FROM   sdd_a1 sdd_a1
  UNION ALL
SELECT sdd_a2.changed_by
      ,sdd_a2.created_by
      ,sdd_a2.date_changed
      ,sdd_a2.date_created
      ,sdd_a2.irid id
      ,sdd_a2.notm number_of_times_modified
      ,sdd_a2.types
FROM   sdd_a10 sdd_a2
  UNION ALL
SELECT sdd_a3.changed_by
      ,sdd_a3.created_by
      ,sdd_a3.date_changed
      ,sdd_a3.date_created
      ,sdd_a3.irid id
      ,sdd_a3.notm number_of_times_modified
      ,sdd_a3.types
FROM   sdd_a11 sdd_a3
  UNION ALL
SELECT sdd_a4.changed_by
      ,sdd_a4.created_by
      ,sdd_a4.date_changed
      ,sdd_a4.date_created
      ,sdd_a4.irid id
      ,sdd_a4.notm number_of_times_modified
      ,sdd_a4.types
FROM   sdd_a2 sdd_a4
  UNION ALL
SELECT sdd_a5.changed_by
      ,sdd_a5.created_by
      ,sdd_a5.date_changed
      ,sdd_a5.date_created
      ,sdd_a5.irid id
      ,sdd_a5.notm number_of_times_modified
      ,sdd_a5.types
FROM   sdd_a20 sdd_a5
  UNION ALL
SELECT sdd_a6.changed_by
      ,sdd_a6.created_by
      ,sdd_a6.date_changed
      ,sdd_a6.date_created
      ,sdd_a6.irid id
      ,sdd_a6.notm number_of_times_modified
      ,sdd_a6.types
FROM   sdd_a21 sdd_a6
  UNION ALL
SELECT sdd_a7.changed_by
      ,sdd_a7.created_by
      ,sdd_a7.date_changed
      ,sdd_a7.date_created
      ,sdd_a7.irid id
      ,sdd_a7.notm number_of_times_modified
      ,sdd_a7.types
FROM   sdd_a23 sdd_a7
  UNION ALL
SELECT sdd_a8.changed_by
      ,sdd_a8.created_by
      ,sdd_a8.date_changed
      ,sdd_a8.date_created
      ,sdd_a8.irid id
      ,sdd_a8.notm number_of_times_modified
      ,sdd_a8.types
FROM   sdd_a24 sdd_a8
  UNION ALL
SELECT sdd_a9.changed_by
      ,sdd_a9.created_by
      ,sdd_a9.date_changed
      ,sdd_a9.date_created
      ,sdd_a9.irid id
      ,sdd_a9.notm number_of_times_modified
      ,sdd_a9.types
FROM   sdd_a3 sdd_a9
  UNION ALL
SELECT sdd_10.changed_by
      ,sdd_10.created_by
      ,sdd_10.date_changed
      ,sdd_10.date_created
      ,sdd_10.irid id
      ,sdd_10.notm number_of_times_modified
      ,sdd_10.types
FROM   sdd_a4 sdd_10
  UNION ALL
SELECT sdd_11.changed_by
      ,sdd_11.created_by
      ,sdd_11.date_changed
      ,sdd_11.date_created
      ,sdd_11.irid id
      ,sdd_11.notm number_of_times_modified
      ,sdd_11.types
FROM   sdd_a5 sdd_11
  UNION ALL
SELECT sdd_12.changed_by
      ,sdd_12.created_by
      ,sdd_12.date_changed
      ,sdd_12.date_created
      ,sdd_12.irid id
      ,sdd_12.notm number_of_times_modified
      ,sdd_12.types
FROM   sdd_a6 sdd_12
  UNION ALL
SELECT sdd_13.changed_by
      ,sdd_13.created_by
      ,sdd_13.date_changed
      ,sdd_13.date_created
      ,sdd_13.irid id
      ,sdd_13.notm number_of_times_modified
      ,sdd_13.types
FROM   sdd_a7 sdd_13
  UNION ALL
SELECT sdd_14.changed_by
      ,sdd_14.created_by
      ,sdd_14.date_changed
      ,sdd_14.date_created
      ,sdd_14.irid id
      ,sdd_14.notm number_of_times_modified
      ,sdd_14.types
FROM   sdd_a8 sdd_14
  UNION ALL
SELECT sdd_15.changed_by
      ,sdd_15.created_by
      ,sdd_15.date_changed
      ,sdd_15.date_created
      ,sdd_15.irid id
      ,sdd_15.notm number_of_times_modified
      ,sdd_15.types
FROM   sdd_a9 sdd_15
  UNION ALL
SELECT sdd_ac.changed_by
      ,sdd_ac.created_by
      ,sdd_ac.date_changed
      ,sdd_ac.date_created
      ,sdd_ac.irid id
      ,sdd_ac.notm number_of_times_modified
      ,sdd_ac.types
FROM   sdd_aci sdd_ac
  UNION ALL
SELECT sdd_16.changed_by
      ,sdd_16.created_by
      ,sdd_16.date_changed
      ,sdd_16.date_created
      ,sdd_16.irid id
      ,sdd_16.notm number_of_times_modified
      ,sdd_16.types
FROM   sdd_acr sdd_16
  UNION ALL
SELECT sdd_17.changed_by
      ,sdd_17.created_by
      ,sdd_17.date_changed
      ,sdd_17.date_created
      ,sdd_17.irid id
      ,sdd_17.notm number_of_times_modified
      ,sdd_17.types
FROM   sdd_acracr sdd_17
  UNION ALL
SELECT sdd_18.changed_by
      ,sdd_18.created_by
      ,sdd_18.date_changed
      ,sdd_18.date_created
      ,sdd_18.irid id
      ,sdd_18.notm number_of_times_modified
      ,sdd_18.types
FROM   sdd_acrorg sdd_18
  UNION ALL
SELECT sdd_19.changed_by
      ,sdd_19.created_by
      ,sdd_19.date_changed
      ,sdd_19.date_created
      ,sdd_19.irid id
      ,sdd_19.notm number_of_times_modified
      ,sdd_19.types
FROM   sdd_act sdd_19
  UNION ALL
SELECT sdd_20.changed_by
      ,sdd_20.created_by
      ,sdd_20.date_changed
      ,sdd_20.date_created
      ,sdd_20.irid id
      ,sdd_20.notm number_of_times_modified
      ,sdd_20.types
FROM   sdd_actact sdd_20
  UNION ALL
SELECT sdd_21.changed_by
      ,sdd_21.created_by
      ,sdd_21.date_changed
      ,sdd_21.date_created
      ,sdd_21.irid id
      ,sdd_21.notm number_of_times_modified
      ,sdd_21.types
FROM   sdd_acte1 sdd_21
  UNION ALL
SELECT sdd_22.changed_by
      ,sdd_22.created_by
      ,sdd_22.date_changed
      ,sdd_22.date_created
      ,sdd_22.irid id
      ,sdd_22.notm number_of_times_modified
      ,sdd_22.types
FROM   sdd_actorg sdd_22
  UNION ALL
SELECT sdd_23.changed_by
      ,sdd_23.created_by
      ,sdd_23.date_changed
      ,sdd_23.date_created
      ,sdd_23.irid id
      ,sdd_23.notm number_of_times_modified
      ,sdd_23.types
FROM   sdd_acuacr sdd_23
  UNION ALL
SELECT sdd_ad.changed_by
      ,sdd_ad.created_by
      ,sdd_ad.date_changed
      ,sdd_ad.date_created
      ,sdd_ad.irid id
      ,sdd_ad.notm number_of_times_modified
      ,sdd_ad.types
FROM   sdd_adr sdd_ad
  UNION ALL
SELECT sdd_ae.changed_by
      ,sdd_ae.created_by
      ,sdd_ae.date_changed
      ,sdd_ae.date_created
      ,sdd_ae.irid id
      ,sdd_ae.notm number_of_times_modified
      ,sdd_ae.types
FROM   sdd_aen sdd_ae
  UNION ALL
SELECT sdd_24.changed_by
      ,sdd_24.created_by
      ,sdd_24.date_changed
      ,sdd_24.date_created
      ,sdd_24.irid id
      ,sdd_24.notm number_of_times_modified
      ,sdd_24.types
FROM   sdd_aeneat sdd_24
  UNION ALL
SELECT sdd_25.changed_by
      ,sdd_25.created_by
      ,sdd_25.date_changed
      ,sdd_25.date_created
      ,sdd_25.irid id
      ,sdd_25.notm number_of_times_modified
      ,sdd_25.types
FROM   sdd_aeu sdd_25
  UNION ALL
SELECT sdd_am.changed_by
      ,sdd_am.created_by
      ,sdd_am.date_changed
      ,sdd_am.date_created
      ,sdd_am.irid id
      ,sdd_am.notm number_of_times_modified
      ,sdd_am.types
FROM   sdd_amcamc sdd_am
  UNION ALL
SELECT sdd_26.changed_by
      ,sdd_26.created_by
      ,sdd_26.date_changed
      ,sdd_26.date_created
      ,sdd_26.irid id
      ,sdd_26.notm number_of_times_modified
      ,sdd_26.types
FROM   sdd_amcbob sdd_26
  UNION ALL
SELECT sdd_27.changed_by
      ,sdd_27.created_by
      ,sdd_27.date_changed
      ,sdd_27.date_created
      ,sdd_27.irid id
      ,sdd_27.notm number_of_times_modified
      ,sdd_27.types
FROM   sdd_amcprj sdd_27
  UNION ALL
SELECT sdd_ar.changed_by
      ,sdd_ar.created_by
      ,sdd_ar.date_changed
      ,sdd_ar.date_created
      ,sdd_ar.irid id
      ,sdd_ar.notm number_of_times_modified
      ,sdd_ar.types
FROM   sdd_arg sdd_ar
  UNION ALL
SELECT sdd_28.changed_by
      ,sdd_28.created_by
      ,sdd_28.date_changed
      ,sdd_28.date_created
      ,sdd_28.irid id
      ,sdd_28.notm number_of_times_modified
      ,sdd_28.types
FROM   sdd_argite sdd_28
  UNION ALL
SELECT sdd_as.changed_by
      ,sdd_as.created_by
      ,sdd_as.date_changed
      ,sdd_as.date_created
      ,sdd_as.irid id
      ,sdd_as.notm number_of_times_modified
      ,sdd_as.types
FROM   sdd_ass sdd_as
  UNION ALL
SELECT sdd_29.changed_by
      ,sdd_29.created_by
      ,sdd_29.date_changed
      ,sdd_29.date_created
      ,sdd_29.irid id
      ,sdd_29.notm number_of_times_modified
      ,sdd_29.types
FROM   sdd_assass sdd_29
  UNION ALL
SELECT sdd_at.changed_by
      ,sdd_at.created_by
      ,sdd_at.date_changed
      ,sdd_at.date_created
      ,sdd_at.irid id
      ,sdd_at.notm number_of_times_modified
      ,sdd_at.types
FROM   sdd_att sdd_at
  UNION ALL
SELECT sdd_30.changed_by
      ,sdd_30.created_by
      ,sdd_30.date_changed
      ,sdd_30.date_created
      ,sdd_30.irid id
      ,sdd_30.notm number_of_times_modified
      ,sdd_30.types
FROM   sdd_atv sdd_30
  UNION ALL
SELECT sdd_ba.changed_by
      ,sdd_ba.created_by
      ,sdd_ba.date_changed
      ,sdd_ba.date_created
      ,sdd_ba.irid id
      ,sdd_ba.notm number_of_times_modified
      ,sdd_ba.types
FROM   sdd_bat sdd_ba
  UNION ALL
SELECT sdd_bl.changed_by
      ,sdd_bl.created_by
      ,sdd_bl.date_changed
      ,sdd_bl.date_created
      ,sdd_bl.irid id
      ,sdd_bl.notm number_of_times_modified
      ,sdd_bl.types
FROM   sdd_bli sdd_bl
  UNION ALL
SELECT sdd_bo.changed_by
      ,sdd_bo.created_by
      ,sdd_bo.date_changed
      ,sdd_bo.date_created
      ,sdd_bo.irid id
      ,sdd_bo.notm number_of_times_modified
      ,sdd_bo.types
FROM   sdd_bob sdd_bo
  UNION ALL
SELECT sdd_b1.changed_by
      ,sdd_b1.created_by
      ,sdd_b1.date_changed
      ,sdd_b1.date_created
      ,sdd_b1.irid id
      ,sdd_b1.notm number_of_times_modified
      ,sdd_b1.types
FROM   sdd_bobinc sdd_b1
  UNION ALL
SELECT sdd_br.changed_by
      ,sdd_br.created_by
      ,sdd_br.date_changed
      ,sdd_br.date_created
      ,sdd_br.irid id
      ,sdd_br.notm number_of_times_modified
      ,sdd_br.types
FROM   sdd_brl sdd_br
  UNION ALL
SELECT sdd_b2.changed_by
      ,sdd_b2.created_by
      ,sdd_b2.date_changed
      ,sdd_b2.date_created
      ,sdd_b2.irid id
      ,sdd_b2.notm number_of_times_modified
      ,sdd_b2.types
FROM   sdd_bru sdd_b2
  UNION ALL
SELECT sdd_b3.changed_by
      ,sdd_b3.created_by
      ,sdd_b3.date_changed
      ,sdd_b3.date_created
      ,sdd_b3.irid id
      ,sdd_b3.notm number_of_times_modified
      ,sdd_b3.types
FROM   sdd_brubli sdd_b3
  UNION ALL
SELECT sdd_bu.changed_by
      ,sdd_bu.created_by
      ,sdd_bu.date_changed
      ,sdd_bu.date_created
      ,sdd_bu.irid id
      ,sdd_bu.notm number_of_times_modified
      ,sdd_bu.types
FROM   sdd_bun sdd_bu
  UNION ALL
SELECT sdd_ca.changed_by
      ,sdd_ca.created_by
      ,sdd_ca.date_changed
      ,sdd_ca.date_created
      ,sdd_ca.irid id
      ,sdd_ca.notm number_of_times_modified
      ,sdd_ca.types
FROM   sdd_cat sdd_ca
  UNION ALL
SELECT sdd_c1.changed_by
      ,sdd_c1.created_by
      ,sdd_c1.date_changed
      ,sdd_c1.date_created
      ,sdd_c1.irid id
      ,sdd_c1.notm number_of_times_modified
      ,sdd_c1.types
FROM   sdd_cataen sdd_c1
  UNION ALL
SELECT sdd_c2.changed_by
      ,sdd_c2.created_by
      ,sdd_c2.date_changed
      ,sdd_c2.date_created
      ,sdd_c2.irid id
      ,sdd_c2.notm number_of_times_modified
      ,sdd_c2.types
FROM   sdd_cateat sdd_c2
  UNION ALL
SELECT sdd_cc.changed_by
      ,sdd_cc.created_by
      ,sdd_cc.date_changed
      ,sdd_cc.date_created
      ,sdd_cc.irid id
      ,sdd_cc.notm number_of_times_modified
      ,sdd_cc.types
FROM   sdd_ccd sdd_cc
  UNION ALL
SELECT sdd_cd.changed_by
      ,sdd_cd.created_by
      ,sdd_cd.date_changed
      ,sdd_cd.date_created
      ,sdd_cd.irid id
      ,sdd_cd.notm number_of_times_modified
      ,sdd_cd.types
FROM   sdd_cde sdd_cd
  UNION ALL
SELECT sdd_cl.changed_by
      ,sdd_cl.created_by
      ,sdd_cl.date_changed
      ,sdd_cl.date_created
      ,sdd_cl.irid id
      ,sdd_cl.notm number_of_times_modified
      ,sdd_cl.types
FROM   sdd_cla sdd_cl
  UNION ALL
SELECT sdd_c3.changed_by
      ,sdd_c3.created_by
      ,sdd_c3.date_changed
      ,sdd_c3.date_created
      ,sdd_c3.irid id
      ,sdd_c3.notm number_of_times_modified
      ,sdd_c3.types
FROM   sdd_claaen sdd_c3
  UNION ALL
SELECT sdd_c4.changed_by
      ,sdd_c4.created_by
      ,sdd_c4.date_changed
      ,sdd_c4.date_created
      ,sdd_c4.irid id
      ,sdd_c4.notm number_of_times_modified
      ,sdd_c4.types
FROM   sdd_clacla sdd_c4
  UNION ALL
SELECT sdd_c5.changed_by
      ,sdd_c5.created_by
      ,sdd_c5.date_changed
      ,sdd_c5.date_created
      ,sdd_c5.irid id
      ,sdd_c5.notm number_of_times_modified
      ,sdd_c5.types
FROM   sdd_claevc sdd_c5
  UNION ALL
SELECT sdd_c6.changed_by
      ,sdd_c6.created_by
      ,sdd_c6.date_changed
      ,sdd_c6.date_created
      ,sdd_c6.irid id
      ,sdd_c6.notm number_of_times_modified
      ,sdd_c6.types
FROM   sdd_clainc sdd_c6
  UNION ALL
SELECT sdd_cm.changed_by
      ,sdd_cm.created_by
      ,sdd_cm.date_changed
      ,sdd_cm.date_created
      ,sdd_cm.irid id
      ,sdd_cm.notm number_of_times_modified
      ,sdd_cm.types
FROM   sdd_cma sdd_cm
  UNION ALL
SELECT sdd_cn.changed_by
      ,sdd_cn.created_by
      ,sdd_cn.date_changed
      ,sdd_cn.date_created
      ,sdd_cn.irid id
      ,sdd_cn.notm number_of_times_modified
      ,sdd_cn.types
FROM   sdd_cnu sdd_cn
  UNION ALL
SELECT sdd_co.changed_by
      ,sdd_co.created_by
      ,sdd_co.date_changed
      ,sdd_co.date_created
      ,sdd_co.irid id
      ,sdd_co.notm number_of_times_modified
      ,sdd_co.types
FROM   sdd_cob sdd_co
  UNION ALL
SELECT sdd_c7.changed_by
      ,sdd_c7.created_by
      ,sdd_c7.date_changed
      ,sdd_c7.date_created
      ,sdd_c7.irid id
      ,sdd_c7.notm number_of_times_modified
      ,sdd_c7.types
FROM   sdd_col sdd_c7
  UNION ALL
SELECT sdd_c8.changed_by
      ,sdd_c8.created_by
      ,sdd_c8.date_changed
      ,sdd_c8.date_created
      ,sdd_c8.irid id
      ,sdd_c8.notm number_of_times_modified
      ,sdd_c8.types
FROM   sdd_com sdd_c8
  UNION ALL
SELECT sdd_c9.changed_by
      ,sdd_c9.created_by
      ,sdd_c9.date_changed
      ,sdd_c9.date_created
      ,sdd_c9.irid id
      ,sdd_c9.notm number_of_times_modified
      ,sdd_c9.types
FROM   sdd_comnod sdd_c9
  UNION ALL
SELECT sdd_31.changed_by
      ,sdd_31.created_by
      ,sdd_31.date_changed
      ,sdd_31.date_created
      ,sdd_31.irid id
      ,sdd_31.notm number_of_times_modified
      ,sdd_31.types
FROM   sdd_comodb sdd_31
  UNION ALL
SELECT sdd_32.changed_by
      ,sdd_32.created_by
      ,sdd_32.date_changed
      ,sdd_32.date_created
      ,sdd_32.irid id
      ,sdd_32.notm number_of_times_modified
      ,sdd_32.types
FROM   sdd_cor sdd_32
  UNION ALL
SELECT sdd_33.changed_by
      ,sdd_33.created_by
      ,sdd_33.date_changed
      ,sdd_33.date_created
      ,sdd_33.irid id
      ,sdd_33.notm number_of_times_modified
      ,sdd_33.types
FROM   sdd_cori sdd_33
  UNION ALL
SELECT sdd_cq.changed_by
      ,sdd_cq.created_by
      ,sdd_cq.date_changed
      ,sdd_cq.date_created
      ,sdd_cq.irid id
      ,sdd_cq.notm number_of_times_modified
      ,sdd_cq.types
FROM   sdd_cqa sdd_cq
  UNION ALL
SELECT sdd_34.changed_by
      ,sdd_34.created_by
      ,sdd_34.date_changed
      ,sdd_34.date_created
      ,sdd_34.irid id
      ,sdd_34.notm number_of_times_modified
      ,sdd_34.types
FROM   sdd_cqacol sdd_34
  UNION ALL
SELECT sdd_cr.changed_by
      ,sdd_cr.created_by
      ,sdd_cr.date_changed
      ,sdd_cr.date_created
      ,sdd_cr.irid id
      ,sdd_cr.notm number_of_times_modified
      ,sdd_cr.types
FROM   sdd_cru sdd_cr
  UNION ALL
SELECT sdd_cs.changed_by
      ,sdd_cs.created_by
      ,sdd_cs.date_changed
      ,sdd_cs.date_created
      ,sdd_cs.irid id
      ,sdd_cs.notm number_of_times_modified
      ,sdd_cs.types
FROM   sdd_csg sdd_cs
  UNION ALL
SELECT sdd_35.changed_by
      ,sdd_35.created_by
      ,sdd_35.date_changed
      ,sdd_35.date_created
      ,sdd_35.irid id
      ,sdd_35.notm number_of_times_modified
      ,sdd_35.types
FROM   sdd_cst sdd_35
  UNION ALL
SELECT sdd_da.changed_by
      ,sdd_da.created_by
      ,sdd_da.date_changed
      ,sdd_da.date_created
      ,sdd_da.irid id
      ,sdd_da.notm number_of_times_modified
      ,sdd_da.types
FROM   sdd_dat sdd_da
  UNION ALL
SELECT sdd_d1.changed_by
      ,sdd_d1.created_by
      ,sdd_d1.date_changed
      ,sdd_d1.date_created
      ,sdd_d1.irid id
      ,sdd_d1.notm number_of_times_modified
      ,sdd_d1.types
FROM   sdd_datcom sdd_d1
  UNION ALL
SELECT sdd_db.changed_by
      ,sdd_db.created_by
      ,sdd_db.date_changed
      ,sdd_db.date_created
      ,sdd_db.irid id
      ,sdd_db.notm number_of_times_modified
      ,sdd_db.types
FROM   sdd_dbu sdd_db
  UNION ALL
SELECT sdd_d2.changed_by
      ,sdd_d2.created_by
      ,sdd_d2.date_changed
      ,sdd_d2.date_created
      ,sdd_d2.irid id
      ,sdd_d2.notm number_of_times_modified
      ,sdd_d2.types
FROM   sdd_dbugrp sdd_d2
  UNION ALL
SELECT sdd_d3.changed_by
      ,sdd_d3.created_by
      ,sdd_d3.date_changed
      ,sdd_d3.date_created
      ,sdd_d3.irid id
      ,sdd_d3.notm number_of_times_modified
      ,sdd_d3.types
FROM   sdd_dbumod sdd_d3
  UNION ALL
SELECT sdd_de.changed_by
      ,sdd_de.created_by
      ,sdd_de.date_changed
      ,sdd_de.date_created
      ,sdd_de.irid id
      ,sdd_de.notm number_of_times_modified
      ,sdd_de.types
FROM   sdd_deu sdd_de
  UNION ALL
SELECT sdd_df.changed_by
      ,sdd_df.created_by
      ,sdd_df.date_changed
      ,sdd_df.date_created
      ,sdd_df.irid id
      ,sdd_df.notm number_of_times_modified
      ,sdd_df.types
FROM   sdd_dfi sdd_df
  UNION ALL
SELECT sdd_d4.changed_by
      ,sdd_d4.created_by
      ,sdd_d4.date_changed
      ,sdd_d4.date_created
      ,sdd_d4.irid id
      ,sdd_d4.notm number_of_times_modified
      ,sdd_d4.types
FROM   sdd_dfl sdd_d4
  UNION ALL
SELECT sdd_d5.changed_by
      ,sdd_d5.created_by
      ,sdd_d5.date_changed
      ,sdd_d5.date_created
      ,sdd_d5.irid id
      ,sdd_d5.notm number_of_times_modified
      ,sdd_d5.types
FROM   sdd_dflatt sdd_d5
  UNION ALL
SELECT sdd_d6.changed_by
      ,sdd_d6.created_by
      ,sdd_d6.date_changed
      ,sdd_d6.date_created
      ,sdd_d6.irid id
      ,sdd_d6.notm number_of_times_modified
      ,sdd_d6.types
FROM   sdd_dfldit sdd_d6
  UNION ALL
SELECT sdd_di.changed_by
      ,sdd_di.created_by
      ,sdd_di.date_changed
      ,sdd_di.date_created
      ,sdd_di.irid id
      ,sdd_di.notm number_of_times_modified
      ,sdd_di.types
FROM   sdd_dia sdd_di
  UNION ALL
SELECT sdd_d7.changed_by
      ,sdd_d7.created_by
      ,sdd_d7.date_changed
      ,sdd_d7.date_created
      ,sdd_d7.irid id
      ,sdd_d7.notm number_of_times_modified
      ,sdd_d7.types
FROM   sdd_diagram_segments sdd_d7
  UNION ALL
SELECT sdd_d8.changed_by
      ,sdd_d8.created_by
      ,sdd_d8.date_changed
      ,sdd_d8.date_created
      ,sdd_d8.irid id
      ,sdd_d8.notm number_of_times_modified
      ,sdd_d8.types
FROM   sdd_dir sdd_d8
  UNION ALL
SELECT sdd_d9.changed_by
      ,sdd_d9.created_by
      ,sdd_d9.date_changed
      ,sdd_d9.date_created
      ,sdd_d9.irid id
      ,sdd_d9.notm number_of_times_modified
      ,sdd_d9.types
FROM   sdd_dit sdd_d9
  UNION ALL
SELECT sdd_do.changed_by
      ,sdd_do.created_by
      ,sdd_do.date_changed
      ,sdd_do.date_created
      ,sdd_do.irid id
      ,sdd_do.notm number_of_times_modified
      ,sdd_do.types
FROM   sdd_doc sdd_do
  UNION ALL
SELECT sdd_36.changed_by
      ,sdd_36.created_by
      ,sdd_36.date_changed
      ,sdd_36.date_created
      ,sdd_36.irid id
      ,sdd_36.notm number_of_times_modified
      ,sdd_36.types
FROM   sdd_docxxx sdd_36
  UNION ALL
SELECT sdd_37.changed_by
      ,sdd_37.created_by
      ,sdd_37.date_changed
      ,sdd_37.date_created
      ,sdd_37.irid id
      ,sdd_37.notm number_of_times_modified
      ,sdd_37.types
FROM   sdd_dog sdd_37
  UNION ALL
SELECT sdd_38.changed_by
      ,sdd_38.created_by
      ,sdd_38.date_changed
      ,sdd_38.date_created
      ,sdd_38.irid id
      ,sdd_38.notm number_of_times_modified
      ,sdd_38.types
FROM   sdd_doi sdd_38
  UNION ALL
SELECT sdd_39.changed_by
      ,sdd_39.created_by
      ,sdd_39.date_changed
      ,sdd_39.date_created
      ,sdd_39.irid id
      ,sdd_39.notm number_of_times_modified
      ,sdd_39.types
FROM   sdd_dom sdd_39
  UNION ALL
SELECT sdd_dp.changed_by
      ,sdd_dp.created_by
      ,sdd_dp.date_changed
      ,sdd_dp.date_created
      ,sdd_dp.irid id
      ,sdd_dp.notm number_of_times_modified
      ,sdd_dp.types
FROM   sdd_dpr sdd_dp
  UNION ALL
SELECT sdd_ds.changed_by
      ,sdd_ds.created_by
      ,sdd_ds.date_changed
      ,sdd_ds.date_created
      ,sdd_ds.irid id
      ,sdd_ds.notm number_of_times_modified
      ,sdd_ds.types
FROM   sdd_dst sdd_ds
  UNION ALL
SELECT sdd_40.changed_by
      ,sdd_40.created_by
      ,sdd_40.date_changed
      ,sdd_40.date_created
      ,sdd_40.irid id
      ,sdd_40.notm number_of_times_modified
      ,sdd_40.types
FROM   sdd_dstatt sdd_40
  UNION ALL
SELECT sdd_41.changed_by
      ,sdd_41.created_by
      ,sdd_41.date_changed
      ,sdd_41.date_created
      ,sdd_41.irid id
      ,sdd_41.notm number_of_times_modified
      ,sdd_41.types
FROM   sdd_dstdit sdd_41
  UNION ALL
SELECT sdd_42.changed_by
      ,sdd_42.created_by
      ,sdd_42.date_changed
      ,sdd_42.date_created
      ,sdd_42.irid id
      ,sdd_42.notm number_of_times_modified
      ,sdd_42.types
FROM   sdd_dsy sdd_42
  UNION ALL
SELECT sdd_e1.changed_by
      ,sdd_e1.created_by
      ,sdd_e1.date_changed
      ,sdd_e1.date_created
      ,sdd_e1.irid id
      ,sdd_e1.notm number_of_times_modified
      ,sdd_e1.types
FROM   sdd_e1 sdd_e1
  UNION ALL
SELECT sdd_e2.changed_by
      ,sdd_e2.created_by
      ,sdd_e2.date_changed
      ,sdd_e2.date_created
      ,sdd_e2.irid id
      ,sdd_e2.notm number_of_times_modified
      ,sdd_e2.types
FROM   sdd_e2 sdd_e2
  UNION ALL
SELECT sdd_e3.changed_by
      ,sdd_e3.created_by
      ,sdd_e3.date_changed
      ,sdd_e3.date_created
      ,sdd_e3.irid id
      ,sdd_e3.notm number_of_times_modified
      ,sdd_e3.types
FROM   sdd_e20 sdd_e3
  UNION ALL
SELECT sdd_e4.changed_by
      ,sdd_e4.created_by
      ,sdd_e4.date_changed
      ,sdd_e4.date_created
      ,sdd_e4.irid id
      ,sdd_e4.notm number_of_times_modified
      ,sdd_e4.types
FROM   sdd_e3 sdd_e4
  UNION ALL
SELECT sdd_e5.changed_by
      ,sdd_e5.created_by
      ,sdd_e5.date_changed
      ,sdd_e5.date_created
      ,sdd_e5.irid id
      ,sdd_e5.notm number_of_times_modified
      ,sdd_e5.types
FROM   sdd_e4 sdd_e5
  UNION ALL
SELECT sdd_e6.changed_by
      ,sdd_e6.created_by
      ,sdd_e6.date_changed
      ,sdd_e6.date_created
      ,sdd_e6.irid id
      ,sdd_e6.notm number_of_times_modified
      ,sdd_e6.types
FROM   sdd_e5 sdd_e6
  UNION ALL
SELECT sdd_e7.changed_by
      ,sdd_e7.created_by
      ,sdd_e7.date_changed
      ,sdd_e7.date_created
      ,sdd_e7.irid id
      ,sdd_e7.notm number_of_times_modified
      ,sdd_e7.types
FROM   sdd_e6 sdd_e7
  UNION ALL
SELECT sdd_en.changed_by
      ,sdd_en.created_by
      ,sdd_en.date_changed
      ,sdd_en.date_created
      ,sdd_en.irid id
      ,sdd_en.notm number_of_times_modified
      ,sdd_en.types
FROM   sdd_ent sdd_en
  UNION ALL
SELECT sdd_e8.changed_by
      ,sdd_e8.created_by
      ,sdd_e8.date_changed
      ,sdd_e8.date_created
      ,sdd_e8.irid id
      ,sdd_e8.notm number_of_times_modified
      ,sdd_e8.types
FROM   sdd_entbun sdd_e8
  UNION ALL
SELECT sdd_e9.changed_by
      ,sdd_e9.created_by
      ,sdd_e9.date_changed
      ,sdd_e9.date_created
      ,sdd_e9.irid id
      ,sdd_e9.notm number_of_times_modified
      ,sdd_e9.types
FROM   sdd_entuie sdd_e9
  UNION ALL
SELECT sdd_eo.changed_by
      ,sdd_eo.created_by
      ,sdd_eo.date_changed
      ,sdd_eo.date_created
      ,sdd_eo.irid id
      ,sdd_eo.notm number_of_times_modified
      ,sdd_eo.types
FROM   sdd_eou sdd_eo
  UNION ALL
SELECT sdd_er.changed_by
      ,sdd_er.created_by
      ,sdd_er.date_changed
      ,sdd_er.date_created
      ,sdd_er.irid id
      ,sdd_er.notm number_of_times_modified
      ,sdd_er.types
FROM   sdd_eru sdd_er
  UNION ALL
SELECT sdd_ev.changed_by
      ,sdd_ev.created_by
      ,sdd_ev.date_changed
      ,sdd_ev.date_created
      ,sdd_ev.irid id
      ,sdd_ev.notm number_of_times_modified
      ,sdd_ev.types
FROM   sdd_evh sdd_ev
  UNION ALL
SELECT sdd_43.changed_by
      ,sdd_43.created_by
      ,sdd_43.date_changed
      ,sdd_43.date_created
      ,sdd_43.irid id
      ,sdd_43.notm number_of_times_modified
      ,sdd_43.types
FROM   sdd_evr sdd_43
  UNION ALL
SELECT sdd_44.changed_by
      ,sdd_44.created_by
      ,sdd_44.date_changed
      ,sdd_44.date_created
      ,sdd_44.irid id
      ,sdd_44.notm number_of_times_modified
      ,sdd_44.types
FROM   sdd_evs sdd_44
  UNION ALL
SELECT sdd_45.changed_by
      ,sdd_45.created_by
      ,sdd_45.date_changed
      ,sdd_45.date_created
      ,sdd_45.irid id
      ,sdd_45.notm number_of_times_modified
      ,sdd_45.types
FROM   sdd_evt sdd_45
  UNION ALL
SELECT sdd_ex.changed_by
      ,sdd_ex.created_by
      ,sdd_ex.date_changed
      ,sdd_ex.date_created
      ,sdd_ex.irid id
      ,sdd_ex.notm number_of_times_modified
      ,sdd_ex.types
FROM   sdd_ext sdd_ex
  UNION ALL
SELECT sdd_fi.changed_by
      ,sdd_fi.created_by
      ,sdd_fi.date_changed
      ,sdd_fi.date_created
      ,sdd_fi.irid id
      ,sdd_fi.notm number_of_times_modified
      ,sdd_fi.types
FROM   sdd_fil sdd_fi
  UNION ALL
SELECT sdd_f1.changed_by
      ,sdd_f1.created_by
      ,sdd_f1.date_changed
      ,sdd_f1.date_created
      ,sdd_f1.irid id
      ,sdd_f1.notm number_of_times_modified
      ,sdd_f1.types
FROM   sdd_files sdd_f1
  UNION ALL
SELECT sdd_f2.changed_by
      ,sdd_f2.created_by
      ,sdd_f2.date_changed
      ,sdd_f2.date_created
      ,sdd_f2.irid id
      ,sdd_f2.notm number_of_times_modified
      ,sdd_f2.types
FROM   sdd_filpac sdd_f2
  UNION ALL
SELECT sdd_fo.changed_by
      ,sdd_fo.created_by
      ,sdd_fo.date_changed
      ,sdd_fo.date_created
      ,sdd_fo.irid id
      ,sdd_fo.notm number_of_times_modified
      ,sdd_fo.types
FROM   sdd_folders sdd_fo
  UNION ALL
SELECT sdd_f3.changed_by
      ,sdd_f3.created_by
      ,sdd_f3.date_changed
      ,sdd_f3.date_created
      ,sdd_f3.irid id
      ,sdd_f3.notm number_of_times_modified
      ,sdd_f3.types
FROM   sdd_folder_members sdd_f3
  UNION ALL
SELECT sdd_fs.changed_by
      ,sdd_fs.created_by
      ,sdd_fs.date_changed
      ,sdd_fs.date_created
      ,sdd_fs.irid id
      ,sdd_fs.notm number_of_times_modified
      ,sdd_fs.types
FROM   sdd_fse sdd_fs
  UNION ALL
SELECT sdd_fu.changed_by
      ,sdd_fu.created_by
      ,sdd_fu.date_changed
      ,sdd_fu.date_created
      ,sdd_fu.irid id
      ,sdd_fu.notm number_of_times_modified
      ,sdd_fu.types
FROM   sdd_fun sdd_fu
  UNION ALL
SELECT sdd_f4.changed_by
      ,sdd_f4.created_by
      ,sdd_f4.date_changed
      ,sdd_f4.date_created
      ,sdd_f4.irid id
      ,sdd_f4.notm number_of_times_modified
      ,sdd_f4.types
FROM   sdd_funatt sdd_f4
  UNION ALL
SELECT sdd_f5.changed_by
      ,sdd_f5.created_by
      ,sdd_f5.date_changed
      ,sdd_f5.date_created
      ,sdd_f5.irid id
      ,sdd_f5.notm number_of_times_modified
      ,sdd_f5.types
FROM   sdd_funbun sdd_f5
  UNION ALL
SELECT sdd_f6.changed_by
      ,sdd_f6.created_by
      ,sdd_f6.date_changed
      ,sdd_f6.date_created
      ,sdd_f6.irid id
      ,sdd_f6.notm number_of_times_modified
      ,sdd_f6.types
FROM   sdd_funent sdd_f6
  UNION ALL
SELECT sdd_f7.changed_by
      ,sdd_f7.created_by
      ,sdd_f7.date_changed
      ,sdd_f7.date_created
      ,sdd_f7.irid id
      ,sdd_f7.notm number_of_times_modified
      ,sdd_f7.types
FROM   sdd_funevt sdd_f7
  UNION ALL
SELECT sdd_gr.changed_by
      ,sdd_gr.created_by
      ,sdd_gr.date_changed
      ,sdd_gr.date_created
      ,sdd_gr.irid id
      ,sdd_gr.notm number_of_times_modified
      ,sdd_gr.types
FROM   sdd_grp sdd_gr
  UNION ALL
SELECT sdd_g1.changed_by
      ,sdd_g1.created_by
      ,sdd_g1.date_changed
      ,sdd_g1.date_created
      ,sdd_g1.irid id
      ,sdd_g1.notm number_of_times_modified
      ,sdd_g1.types
FROM   sdd_grpgrp sdd_g1
  UNION ALL
SELECT sdd_g2.changed_by
      ,sdd_g2.created_by
      ,sdd_g2.date_changed
      ,sdd_g2.date_created
      ,sdd_g2.irid id
      ,sdd_g2.notm number_of_times_modified
      ,sdd_g2.types
FROM   sdd_grpmod sdd_g2
  UNION ALL
SELECT sdd_ig.changed_by
      ,sdd_ig.created_by
      ,sdd_ig.date_changed
      ,sdd_ig.date_created
      ,sdd_ig.irid id
      ,sdd_ig.notm number_of_times_modified
      ,sdd_ig.types
FROM   sdd_igr sdd_ig
  UNION ALL
SELECT sdd_in.changed_by
      ,sdd_in.created_by
      ,sdd_in.date_changed
      ,sdd_in.date_created
      ,sdd_in.irid id
      ,sdd_in.notm number_of_times_modified
      ,sdd_in.types
FROM   sdd_ind sdd_in
  UNION ALL
SELECT sdd_i1.changed_by
      ,sdd_i1.created_by
      ,sdd_i1.date_changed
      ,sdd_i1.date_created
      ,sdd_i1.irid id
      ,sdd_i1.notm number_of_times_modified
      ,sdd_i1.types
FROM   sdd_indcol sdd_i1
  UNION ALL
SELECT sdd_i2.changed_by
      ,sdd_i2.created_by
      ,sdd_i2.date_changed
      ,sdd_i2.date_created
      ,sdd_i2.irid id
      ,sdd_i2.notm number_of_times_modified
      ,sdd_i2.types
FROM   sdd_inp sdd_i2
  UNION ALL
SELECT sdd_i3.changed_by
      ,sdd_i3.created_by
      ,sdd_i3.date_changed
      ,sdd_i3.date_created
      ,sdd_i3.irid id
      ,sdd_i3.notm number_of_times_modified
      ,sdd_i3.types
FROM   sdd_ins sdd_i3
  UNION ALL
SELECT sdd_it.changed_by
      ,sdd_it.created_by
      ,sdd_it.date_changed
      ,sdd_it.date_created
      ,sdd_it.irid id
      ,sdd_it.notm number_of_times_modified
      ,sdd_it.types
FROM   sdd_ite sdd_it
  UNION ALL
SELECT sdd_i4.changed_by
      ,sdd_i4.created_by
      ,sdd_i4.date_changed
      ,sdd_i4.date_created
      ,sdd_i4.irid id
      ,sdd_i4.notm number_of_times_modified
      ,sdd_i4.types
FROM   sdd_itm sdd_i4
  UNION ALL
SELECT sdd_la.changed_by
      ,sdd_la.created_by
      ,sdd_la.date_changed
      ,sdd_la.date_created
      ,sdd_la.irid id
      ,sdd_la.notm number_of_times_modified
      ,sdd_la.types
FROM   sdd_lan sdd_la
  UNION ALL
SELECT sdd_ls.changed_by
      ,sdd_ls.created_by
      ,sdd_ls.date_changed
      ,sdd_ls.date_created
      ,sdd_ls.irid id
      ,sdd_ls.notm number_of_times_modified
      ,sdd_ls.types
FROM   sdd_lst sdd_ls
  UNION ALL
SELECT sdd_lv.changed_by
      ,sdd_lv.created_by
      ,sdd_lv.date_changed
      ,sdd_lv.date_created
      ,sdd_lv.irid id
      ,sdd_lv.notm number_of_times_modified
      ,sdd_lv.types
FROM   sdd_lvi sdd_lv
  UNION ALL
SELECT sdd_ma.changed_by
      ,sdd_ma.created_by
      ,sdd_ma.date_changed
      ,sdd_ma.date_created
      ,sdd_ma.irid id
      ,sdd_ma.notm number_of_times_modified
      ,sdd_ma.types
FROM   sdd_map sdd_ma
  UNION ALL
SELECT sdd_mc.changed_by
      ,sdd_mc.created_by
      ,sdd_mc.date_changed
      ,sdd_mc.date_created
      ,sdd_mc.irid id
      ,sdd_mc.notm number_of_times_modified
      ,sdd_mc.types
FROM   sdd_mch sdd_mc
  UNION ALL
SELECT sdd_m1.changed_by
      ,sdd_m1.created_by
      ,sdd_m1.date_changed
      ,sdd_m1.date_created
      ,sdd_m1.irid id
      ,sdd_m1.notm number_of_times_modified
      ,sdd_m1.types
FROM   sdd_mcl sdd_m1
  UNION ALL
SELECT sdd_m2.changed_by
      ,sdd_m2.created_by
      ,sdd_m2.date_changed
      ,sdd_m2.date_created
      ,sdd_m2.irid id
      ,sdd_m2.notm number_of_times_modified
      ,sdd_m2.types
FROM   sdd_mcn sdd_m2
  UNION ALL
SELECT sdd_me.changed_by
      ,sdd_me.created_by
      ,sdd_me.date_changed
      ,sdd_me.date_created
      ,sdd_me.irid id
      ,sdd_me.notm number_of_times_modified
      ,sdd_me.types
FROM   sdd_memcom sdd_me
  UNION ALL
SELECT sdd_m3.changed_by
      ,sdd_m3.created_by
      ,sdd_m3.date_changed
      ,sdd_m3.date_created
      ,sdd_m3.irid id
      ,sdd_m3.notm number_of_times_modified
      ,sdd_m3.types
FROM   sdd_met sdd_m3
  UNION ALL
SELECT sdd_m4.changed_by
      ,sdd_m4.created_by
      ,sdd_m4.date_changed
      ,sdd_m4.date_created
      ,sdd_m4.irid id
      ,sdd_m4.notm number_of_times_modified
      ,sdd_m4.types
FROM   sdd_metrul sdd_m4
  UNION ALL
SELECT sdd_mo.changed_by
      ,sdd_mo.created_by
      ,sdd_mo.date_changed
      ,sdd_mo.date_created
      ,sdd_mo.irid id
      ,sdd_mo.notm number_of_times_modified
      ,sdd_mo.types
FROM   sdd_mod sdd_mo
  UNION ALL
SELECT sdd_m5.changed_by
      ,sdd_m5.created_by
      ,sdd_m5.date_changed
      ,sdd_m5.date_created
      ,sdd_m5.irid id
      ,sdd_m5.notm number_of_times_modified
      ,sdd_m5.types
FROM   sdd_modbun sdd_m5
  UNION ALL
SELECT sdd_m6.changed_by
      ,sdd_m6.created_by
      ,sdd_m6.date_changed
      ,sdd_m6.date_created
      ,sdd_m6.irid id
      ,sdd_m6.notm number_of_times_modified
      ,sdd_m6.types
FROM   sdd_modfun sdd_m6
  UNION ALL
SELECT sdd_m7.changed_by
      ,sdd_m7.created_by
      ,sdd_m7.date_changed
      ,sdd_m7.date_created
      ,sdd_m7.irid id
      ,sdd_m7.notm number_of_times_modified
      ,sdd_m7.types
FROM   sdd_modmod sdd_m7
  UNION ALL
SELECT sdd_m8.changed_by
      ,sdd_m8.created_by
      ,sdd_m8.date_changed
      ,sdd_m8.date_created
      ,sdd_m8.irid id
      ,sdd_m8.notm number_of_times_modified
      ,sdd_m8.types
FROM   sdd_modpgd sdd_m8
  UNION ALL
SELECT sdd_mp.changed_by
      ,sdd_mp.created_by
      ,sdd_mp.date_changed
      ,sdd_mp.date_created
      ,sdd_mp.irid id
      ,sdd_mp.notm number_of_times_modified
      ,sdd_mp.types
FROM   sdd_mpa sdd_mp
  UNION ALL
SELECT sdd_mt.changed_by
      ,sdd_mt.created_by
      ,sdd_mt.date_changed
      ,sdd_mt.date_created
      ,sdd_mt.irid id
      ,sdd_mt.notm number_of_times_modified
      ,sdd_mt.types
FROM   sdd_mti sdd_mt
  UNION ALL
SELECT sdd_mu.changed_by
      ,sdd_mu.created_by
      ,sdd_mu.date_changed
      ,sdd_mu.date_created
      ,sdd_mu.irid id
      ,sdd_mu.notm number_of_times_modified
      ,sdd_mu.types
FROM   sdd_mun sdd_mu
  UNION ALL
SELECT sdd_mw.changed_by
      ,sdd_mw.created_by
      ,sdd_mw.date_changed
      ,sdd_mw.date_created
      ,sdd_mw.irid id
      ,sdd_mw.notm number_of_times_modified
      ,sdd_mw.types
FROM   sdd_mwf sdd_mw
  UNION ALL
SELECT sdd_oc.changed_by
      ,sdd_oc.created_by
      ,sdd_oc.date_changed
      ,sdd_oc.date_created
      ,sdd_oc.irid id
      ,sdd_oc.notm number_of_times_modified
      ,sdd_oc.types
FROM   sdd_ocl sdd_oc
  UNION ALL
SELECT sdd_o1.changed_by
      ,sdd_o1.created_by
      ,sdd_o1.date_changed
      ,sdd_o1.date_created
      ,sdd_o1.irid id
      ,sdd_o1.notm number_of_times_modified
      ,sdd_o1.types
FROM   sdd_oco sdd_o1
  UNION ALL
SELECT sdd_od.changed_by
      ,sdd_od.created_by
      ,sdd_od.date_changed
      ,sdd_od.date_created
      ,sdd_od.irid id
      ,sdd_od.notm number_of_times_modified
      ,sdd_od.types
FROM   sdd_odb sdd_od
  UNION ALL
SELECT sdd_o2.changed_by
      ,sdd_o2.created_by
      ,sdd_o2.date_changed
      ,sdd_o2.date_created
      ,sdd_o2.irid id
      ,sdd_o2.notm number_of_times_modified
      ,sdd_o2.types
FROM   sdd_odbodb sdd_o2
  UNION ALL
SELECT sdd_ok.changed_by
      ,sdd_ok.created_by
      ,sdd_ok.date_changed
      ,sdd_ok.date_created
      ,sdd_ok.irid id
      ,sdd_ok.notm number_of_times_modified
      ,sdd_ok.types
FROM   sdd_oky sdd_ok
  UNION ALL
SELECT sdd_or.changed_by
      ,sdd_or.created_by
      ,sdd_or.date_changed
      ,sdd_or.date_created
      ,sdd_or.irid id
      ,sdd_or.notm number_of_times_modified
      ,sdd_or.types
FROM   sdd_org sdd_or
  UNION ALL
SELECT sdd_o3.changed_by
      ,sdd_o3.created_by
      ,sdd_o3.date_changed
      ,sdd_o3.date_created
      ,sdd_o3.irid id
      ,sdd_o3.notm number_of_times_modified
      ,sdd_o3.types
FROM   sdd_orgper sdd_o3
  UNION ALL
SELECT sdd_o4.changed_by
      ,sdd_o4.created_by
      ,sdd_o4.date_changed
      ,sdd_o4.date_created
      ,sdd_o4.irid id
      ,sdd_o4.notm number_of_times_modified
      ,sdd_o4.types
FROM   sdd_ors sdd_o4
  UNION ALL
SELECT sdd_o5.changed_by
      ,sdd_o5.created_by
      ,sdd_o5.date_changed
      ,sdd_o5.date_created
      ,sdd_o5.irid id
      ,sdd_o5.notm number_of_times_modified
      ,sdd_o5.types
FROM   sdd_ort sdd_o5
  UNION ALL
SELECT sdd_os.changed_by
      ,sdd_os.created_by
      ,sdd_os.date_changed
      ,sdd_os.date_created
      ,sdd_os.irid id
      ,sdd_os.notm number_of_times_modified
      ,sdd_os.types
FROM   sdd_osp sdd_os
  UNION ALL
SELECT sdd_o6.changed_by
      ,sdd_o6.created_by
      ,sdd_o6.date_changed
      ,sdd_o6.date_created
      ,sdd_o6.irid id
      ,sdd_o6.notm number_of_times_modified
      ,sdd_o6.types
FROM   sdd_osq sdd_o6
  UNION ALL
SELECT sdd_o7.changed_by
      ,sdd_o7.created_by
      ,sdd_o7.date_changed
      ,sdd_o7.date_created
      ,sdd_o7.irid id
      ,sdd_o7.notm number_of_times_modified
      ,sdd_o7.types
FROM   sdd_ost sdd_o7
  UNION ALL
SELECT sdd_o8.changed_by
      ,sdd_o8.created_by
      ,sdd_o8.date_changed
      ,sdd_o8.date_created
      ,sdd_o8.irid id
      ,sdd_o8.notm number_of_times_modified
      ,sdd_o8.types
FROM   sdd_ostost sdd_o8
  UNION ALL
SELECT sdd_ot.changed_by
      ,sdd_ot.created_by
      ,sdd_ot.date_changed
      ,sdd_ot.date_created
      ,sdd_ot.irid id
      ,sdd_ot.notm number_of_times_modified
      ,sdd_ot.types
FROM   sdd_otb sdd_ot
  UNION ALL
SELECT sdd_pe.changed_by
      ,sdd_pe.created_by
      ,sdd_pe.date_changed
      ,sdd_pe.date_created
      ,sdd_pe.irid id
      ,sdd_pe.notm number_of_times_modified
      ,sdd_pe.types
FROM   sdd_per sdd_pe
  UNION ALL
SELECT sdd_p1.changed_by
      ,sdd_p1.created_by
      ,sdd_p1.date_changed
      ,sdd_p1.date_created
      ,sdd_p1.irid id
      ,sdd_p1.notm number_of_times_modified
      ,sdd_p1.types
FROM   sdd_peracr sdd_p1
  UNION ALL
SELECT sdd_p2.changed_by
      ,sdd_p2.created_by
      ,sdd_p2.date_changed
      ,sdd_p2.date_created
      ,sdd_p2.irid id
      ,sdd_p2.notm number_of_times_modified
      ,sdd_p2.types
FROM   sdd_perper sdd_p2
  UNION ALL
SELECT sdd_pg.changed_by
      ,sdd_pg.created_by
      ,sdd_pg.date_changed
      ,sdd_pg.date_created
      ,sdd_pg.irid id
      ,sdd_pg.notm number_of_times_modified
      ,sdd_pg.types
FROM   sdd_pgd sdd_pg
  UNION ALL
SELECT sdd_pr.changed_by
      ,sdd_pr.created_by
      ,sdd_pr.date_changed
      ,sdd_pr.date_created
      ,sdd_pr.irid id
      ,sdd_pr.notm number_of_times_modified
      ,sdd_pr.types
FROM   sdd_prs sdd_pr
  UNION ALL
SELECT sdd_p3.changed_by
      ,sdd_p3.created_by
      ,sdd_p3.date_changed
      ,sdd_p3.date_created
      ,sdd_p3.irid id
      ,sdd_p3.notm number_of_times_modified
      ,sdd_p3.types
FROM   sdd_pru sdd_p3
  UNION ALL
SELECT sdd_ps.changed_by
      ,sdd_ps.created_by
      ,sdd_ps.date_changed
      ,sdd_ps.date_created
      ,sdd_ps.irid id
      ,sdd_ps.notm number_of_times_modified
      ,sdd_ps.types
FROM   sdd_pse sdd_ps
  UNION ALL
SELECT sdd_p4.changed_by
      ,sdd_p4.created_by
      ,sdd_p4.date_changed
      ,sdd_p4.date_created
      ,sdd_p4.irid id
      ,sdd_p4.notm number_of_times_modified
      ,sdd_p4.types
FROM   sdd_pst sdd_p4
  UNION ALL
SELECT sdd_p5.changed_by
      ,sdd_p5.created_by
      ,sdd_p5.date_changed
      ,sdd_p5.date_created
      ,sdd_p5.irid id
      ,sdd_p5.notm number_of_times_modified
      ,sdd_p5.types
FROM   sdd_pstadc sdd_p5
  UNION ALL
SELECT sdd_pv.changed_by
      ,sdd_pv.created_by
      ,sdd_pv.date_changed
      ,sdd_pv.date_created
      ,sdd_pv.irid id
      ,sdd_pv.notm number_of_times_modified
      ,sdd_pv.types
FROM   sdd_pvl sdd_pv
  UNION ALL
SELECT sdd_qs.changed_by
      ,sdd_qs.created_by
      ,sdd_qs.date_changed
      ,sdd_qs.date_created
      ,sdd_qs.irid id
      ,sdd_qs.notm number_of_times_modified
      ,sdd_qs.types
FROM   sdd_qsu sdd_qs
  UNION ALL
SELECT sdd_qt.changed_by
      ,sdd_qt.created_by
      ,sdd_qt.date_changed
      ,sdd_qt.date_created
      ,sdd_qt.irid id
      ,sdd_qt.notm number_of_times_modified
      ,sdd_qt.types
FROM   sdd_qtd sdd_qt
  UNION ALL
SELECT sdd_qu.changed_by
      ,sdd_qu.created_by
      ,sdd_qu.date_changed
      ,sdd_qu.date_created
      ,sdd_qu.irid id
      ,sdd_qu.notm number_of_times_modified
      ,sdd_qu.types
FROM   sdd_que sdd_qu
  UNION ALL
SELECT sdd_q1.changed_by
      ,sdd_q1.created_by
      ,sdd_q1.date_changed
      ,sdd_q1.date_created
      ,sdd_q1.irid id
      ,sdd_q1.notm number_of_times_modified
      ,sdd_q1.types
FROM   sdd_qui sdd_q1
  UNION ALL
SELECT sdd_re.changed_by
      ,sdd_re.created_by
      ,sdd_re.date_changed
      ,sdd_re.date_created
      ,sdd_re.irid id
      ,sdd_re.notm number_of_times_modified
      ,sdd_re.types
FROM   sdd_relend sdd_re
  UNION ALL
SELECT sdd_rg.changed_by
      ,sdd_rg.created_by
      ,sdd_rg.date_changed
      ,sdd_rg.date_created
      ,sdd_rg.irid id
      ,sdd_rg.notm number_of_times_modified
      ,sdd_rg.types
FROM   sdd_rgp sdd_rg
  UNION ALL
SELECT sdd_rp.changed_by
      ,sdd_rp.created_by
      ,sdd_rp.date_changed
      ,sdd_rp.date_created
      ,sdd_rp.irid id
      ,sdd_rp.notm number_of_times_modified
      ,sdd_rp.types
FROM   sdd_rpg sdd_rp
  UNION ALL
SELECT sdd_ru.changed_by
      ,sdd_ru.created_by
      ,sdd_ru.date_changed
      ,sdd_ru.date_created
      ,sdd_ru.irid id
      ,sdd_ru.notm number_of_times_modified
      ,sdd_ru.types
FROM   sdd_rul sdd_ru
  UNION ALL
SELECT sdd_r1.changed_by
      ,sdd_r1.created_by
      ,sdd_r1.date_changed
      ,sdd_r1.date_created
      ,sdd_r1.irid id
      ,sdd_r1.notm number_of_times_modified
      ,sdd_r1.types
FROM   sdd_rulrul sdd_r1
  UNION ALL
SELECT sdd_sb.changed_by
      ,sdd_sb.created_by
      ,sdd_sb.date_changed
      ,sdd_sb.date_created
      ,sdd_sb.irid id
      ,sdd_sb.notm number_of_times_modified
      ,sdd_sb.types
FROM   sdd_sba sdd_sb
  UNION ALL
SELECT sdd_sm.changed_by
      ,sdd_sm.created_by
      ,sdd_sm.date_changed
      ,sdd_sm.date_created
      ,sdd_sm.irid id
      ,sdd_sm.notm number_of_times_modified
      ,sdd_sm.types
FROM   sdd_smi sdd_sm
  UNION ALL
SELECT sdd_so.changed_by
      ,sdd_so.created_by
      ,sdd_so.date_changed
      ,sdd_so.date_created
      ,sdd_so.irid id
      ,sdd_so.notm number_of_times_modified
      ,sdd_so.types
FROM   sdd_sou sdd_so
  UNION ALL
SELECT sdd_sp.changed_by
      ,sdd_sp.created_by
      ,sdd_sp.date_changed
      ,sdd_sp.date_created
      ,sdd_sp.irid id
      ,sdd_sp.notm number_of_times_modified
      ,sdd_sp.types
FROM   sdd_spv sdd_sp
  UNION ALL
SELECT sdd_sq.changed_by
      ,sdd_sq.created_by
      ,sdd_sq.date_changed
      ,sdd_sq.date_created
      ,sdd_sq.irid id
      ,sdd_sq.notm number_of_times_modified
      ,sdd_sq.types
FROM   sdd_sqs sdd_sq
  UNION ALL
SELECT sdd_sr.changed_by
      ,sdd_sr.created_by
      ,sdd_sr.date_changed
      ,sdd_sr.date_created
      ,sdd_sr.irid id
      ,sdd_sr.notm number_of_times_modified
      ,sdd_sr.types
FROM   sdd_srg sdd_sr
  UNION ALL
SELECT sdd_s1.changed_by
      ,sdd_s1.created_by
      ,sdd_s1.date_changed
      ,sdd_s1.date_created
      ,sdd_s1.irid id
      ,sdd_s1.notm number_of_times_modified
      ,sdd_s1.types
FROM   sdd_sru sdd_s1
  UNION ALL
SELECT sdd_st.changed_by
      ,sdd_st.created_by
      ,sdd_st.date_changed
      ,sdd_st.date_created
      ,sdd_st.irid id
      ,sdd_st.notm number_of_times_modified
      ,sdd_st.types
FROM   sdd_ste sdd_st
  UNION ALL
SELECT sdd_s2.changed_by
      ,sdd_s2.created_by
      ,sdd_s2.date_changed
      ,sdd_s2.date_created
      ,sdd_s2.irid id
      ,sdd_s2.notm number_of_times_modified
      ,sdd_s2.types
FROM   sdd_steste sdd_s2
  UNION ALL
SELECT sdd_su.changed_by
      ,sdd_su.created_by
      ,sdd_su.date_changed
      ,sdd_su.date_created
      ,sdd_su.irid id
      ,sdd_su.notm number_of_times_modified
      ,sdd_su.types
FROM   sdd_sud sdd_su
  UNION ALL
SELECT sdd_sy.changed_by
      ,sdd_sy.created_by
      ,sdd_sy.date_changed
      ,sdd_sy.date_created
      ,sdd_sy.irid id
      ,sdd_sy.notm number_of_times_modified
      ,sdd_sy.types
FROM   sdd_syn sdd_sy
  UNION ALL
SELECT sdd_ta.changed_by
      ,sdd_ta.created_by
      ,sdd_ta.date_changed
      ,sdd_ta.date_created
      ,sdd_ta.irid id
      ,sdd_ta.notm number_of_times_modified
      ,sdd_ta.types
FROM   sdd_tab sdd_ta
  UNION ALL
SELECT sdd_t1.changed_by
      ,sdd_t1.created_by
      ,sdd_t1.date_changed
      ,sdd_t1.date_created
      ,sdd_t1.irid id
      ,sdd_t1.notm number_of_times_modified
      ,sdd_t1.types
FROM   sdd_tabent sdd_t1
  UNION ALL
SELECT sdd_t2.changed_by
      ,sdd_t2.created_by
      ,sdd_t2.date_changed
      ,sdd_t2.date_created
      ,sdd_t2.irid id
      ,sdd_t2.notm number_of_times_modified
      ,sdd_t2.types
FROM   sdd_tag sdd_t2
  UNION ALL
SELECT sdd_t3.changed_by
      ,sdd_t3.created_by
      ,sdd_t3.date_changed
      ,sdd_t3.date_created
      ,sdd_t3.irid id
      ,sdd_t3.notm number_of_times_modified
      ,sdd_t3.types
FROM   sdd_tagval sdd_t3
  UNION ALL
SELECT sdd_tb.changed_by
      ,sdd_tb.created_by
      ,sdd_tb.date_changed
      ,sdd_tb.date_created
      ,sdd_tb.irid id
      ,sdd_tb.notm number_of_times_modified
      ,sdd_tb.types
FROM   sdd_tbicol sdd_tb
  UNION ALL
SELECT sdd_t4.changed_by
      ,sdd_t4.created_by
      ,sdd_t4.date_changed
      ,sdd_t4.date_created
      ,sdd_t4.irid id
      ,sdd_t4.notm number_of_times_modified
      ,sdd_t4.types
FROM   sdd_tbp sdd_t4
  UNION ALL
SELECT sdd_te.changed_by
      ,sdd_te.created_by
      ,sdd_te.date_changed
      ,sdd_te.date_created
      ,sdd_te.irid id
      ,sdd_te.notm number_of_times_modified
      ,sdd_te.types
FROM   sdd_ter sdd_te
  UNION ALL
SELECT sdd_tm.changed_by
      ,sdd_tm.created_by
      ,sdd_tm.date_changed
      ,sdd_tm.date_created
      ,sdd_tm.irid id
      ,sdd_tm.notm number_of_times_modified
      ,sdd_tm.types
FROM   sdd_tms sdd_tm
  UNION ALL
SELECT sdd_tr.changed_by
      ,sdd_tr.created_by
      ,sdd_tr.date_changed
      ,sdd_tr.date_created
      ,sdd_tr.irid id
      ,sdd_tr.notm number_of_times_modified
      ,sdd_tr.types
FROM   sdd_tra sdd_tr
  UNION ALL
SELECT sdd_t5.changed_by
      ,sdd_t5.created_by
      ,sdd_t5.date_changed
      ,sdd_t5.date_created
      ,sdd_t5.irid id
      ,sdd_t5.notm number_of_times_modified
      ,sdd_t5.types
FROM   sdd_trg sdd_t5
  UNION ALL
SELECT sdd_t6.changed_by
      ,sdd_t6.created_by
      ,sdd_t6.date_changed
      ,sdd_t6.date_created
      ,sdd_t6.irid id
      ,sdd_t6.notm number_of_times_modified
      ,sdd_t6.types
FROM   sdd_trgcol sdd_t6
  UNION ALL
SELECT sdd_ts.changed_by
      ,sdd_ts.created_by
      ,sdd_ts.date_changed
      ,sdd_ts.date_created
      ,sdd_ts.irid id
      ,sdd_ts.notm number_of_times_modified
      ,sdd_ts.types
FROM   sdd_tsq sdd_ts
  UNION ALL
SELECT sdd_uc.changed_by
      ,sdd_uc.created_by
      ,sdd_uc.date_changed
      ,sdd_uc.date_created
      ,sdd_uc.irid id
      ,sdd_uc.notm number_of_times_modified
      ,sdd_uc.types
FROM   sdd_uca sdd_uc
  UNION ALL
SELECT sdd_ud.changed_by
      ,sdd_ud.created_by
      ,sdd_ud.date_changed
      ,sdd_ud.date_created
      ,sdd_ud.irid id
      ,sdd_ud.notm number_of_times_modified
      ,sdd_ud.types
FROM   sdd_ude sdd_ud
  UNION ALL
SELECT sdd_u1.changed_by
      ,sdd_u1.created_by
      ,sdd_u1.date_changed
      ,sdd_u1.date_created
      ,sdd_u1.irid id
      ,sdd_u1.notm number_of_times_modified
      ,sdd_u1.types
FROM   sdd_udecli sdd_u1
  UNION ALL
SELECT sdd_u2.changed_by
      ,sdd_u2.created_by
      ,sdd_u2.date_changed
      ,sdd_u2.date_created
      ,sdd_u2.irid id
      ,sdd_u2.notm number_of_times_modified
      ,sdd_u2.types
FROM   sdd_udesup sdd_u2
  UNION ALL
SELECT sdd_u3.changed_by
      ,sdd_u3.created_by
      ,sdd_u3.date_changed
      ,sdd_u3.date_created
      ,sdd_u3.irid id
      ,sdd_u3.notm number_of_times_modified
      ,sdd_u3.types
FROM   sdd_uds sdd_u3
  UNION ALL
SELECT sdd_ue.changed_by
      ,sdd_ue.created_by
      ,sdd_ue.date_changed
      ,sdd_ue.date_created
      ,sdd_ue.irid id
      ,sdd_ue.notm number_of_times_modified
      ,sdd_ue.types
FROM   sdd_uee sdd_ue
  UNION ALL
SELECT sdd_u4.changed_by
      ,sdd_u4.created_by
      ,sdd_u4.date_changed
      ,sdd_u4.date_created
      ,sdd_u4.irid id
      ,sdd_u4.notm number_of_times_modified
      ,sdd_u4.types
FROM   sdd_ues sdd_u4
  UNION ALL
SELECT sdd_ui.changed_by
      ,sdd_ui.created_by
      ,sdd_ui.date_changed
      ,sdd_ui.date_created
      ,sdd_ui.irid id
      ,sdd_ui.notm number_of_times_modified
      ,sdd_ui.types
FROM   sdd_uid sdd_ui
  UNION ALL
SELECT sdd_up.changed_by
      ,sdd_up.created_by
      ,sdd_up.date_changed
      ,sdd_up.date_created
      ,sdd_up.irid id
      ,sdd_up.notm number_of_times_modified
      ,sdd_up.types
FROM   sdd_upr sdd_up
  UNION ALL
SELECT sdd_ur.changed_by
      ,sdd_ur.created_by
      ,sdd_ur.date_changed
      ,sdd_ur.date_created
      ,sdd_ur.irid id
      ,sdd_ur.notm number_of_times_modified
      ,sdd_ur.types
FROM   sdd_uru sdd_ur
  UNION ALL
SELECT sdd_us.changed_by
      ,sdd_us.created_by
      ,sdd_us.date_changed
      ,sdd_us.date_created
      ,sdd_us.irid id
      ,sdd_us.notm number_of_times_modified
      ,sdd_us.types
FROM   sdd_usc sdd_us
  UNION ALL
SELECT sdd_u5.changed_by
      ,sdd_u5.created_by
      ,sdd_u5.date_changed
      ,sdd_u5.date_created
      ,sdd_u5.irid id
      ,sdd_u5.notm number_of_times_modified
      ,sdd_u5.types
FROM   sdd_uscacr sdd_u5
  UNION ALL
SELECT sdd_u6.changed_by
      ,sdd_u6.created_by
      ,sdd_u6.date_changed
      ,sdd_u6.date_created
      ,sdd_u6.irid id
      ,sdd_u6.notm number_of_times_modified
      ,sdd_u6.types
FROM   sdd_usce1 sdd_u6
  UNION ALL
SELECT sdd_u7.changed_by
      ,sdd_u7.created_by
      ,sdd_u7.date_changed
      ,sdd_u7.date_created
      ,sdd_u7.irid id
      ,sdd_u7.notm number_of_times_modified
      ,sdd_u7.types
FROM   sdd_uscepa sdd_u7
  UNION ALL
SELECT sdd_u8.changed_by
      ,sdd_u8.created_by
      ,sdd_u8.date_changed
      ,sdd_u8.date_created
      ,sdd_u8.irid id
      ,sdd_u8.notm number_of_times_modified
      ,sdd_u8.types
FROM   sdd_uscevi sdd_u8
  UNION ALL
SELECT sdd_u9.changed_by
      ,sdd_u9.created_by
      ,sdd_u9.date_changed
      ,sdd_u9.date_created
      ,sdd_u9.irid id
      ,sdd_u9.notm number_of_times_modified
      ,sdd_u9.types
FROM   sdd_uscevo sdd_u9
  UNION ALL
SELECT sdd_46.changed_by
      ,sdd_46.created_by
      ,sdd_46.date_changed
      ,sdd_46.date_created
      ,sdd_46.irid id
      ,sdd_46.notm number_of_times_modified
      ,sdd_46.types
FROM   sdd_uscusc sdd_46
  UNION ALL
SELECT sdd_va.changed_by
      ,sdd_va.created_by
      ,sdd_va.date_changed
      ,sdd_va.date_created
      ,sdd_va.irid id
      ,sdd_va.notm number_of_times_modified
      ,sdd_va.types
FROM   sdd_val sdd_va
  UNION ALL
SELECT sdd_v1.changed_by
      ,sdd_v1.created_by
      ,sdd_v1.date_changed
      ,sdd_v1.date_created
      ,sdd_v1.irid id
      ,sdd_v1.notm number_of_times_modified
      ,sdd_v1.types
FROM   sdd_valgat sdd_v1
  UNION ALL
SELECT sdd_vl.changed_by
      ,sdd_vl.created_by
      ,sdd_vl.date_changed
      ,sdd_vl.date_created
      ,sdd_vl.irid id
      ,sdd_vl.notm number_of_times_modified
      ,sdd_vl.types
FROM   sdd_vle sdd_vl
  UNION ALL
SELECT sdd_v2.changed_by
      ,sdd_v2.created_by
      ,sdd_v2.date_changed
      ,sdd_v2.date_created
      ,sdd_v2.irid id
      ,sdd_v2.notm number_of_times_modified
      ,sdd_v2.types
FROM   sdd_vleu sdd_v2
  UNION ALL
SELECT sdd_v3.changed_by
      ,sdd_v3.created_by
      ,sdd_v3.date_changed
      ,sdd_v3.date_created
      ,sdd_v3.irid id
      ,sdd_v3.notm number_of_times_modified
      ,sdd_v3.types
FROM   sdd_vlevoa sdd_v3
  UNION ALL
SELECT sdd_v4.changed_by
      ,sdd_v4.created_by
      ,sdd_v4.date_changed
      ,sdd_v4.date_created
      ,sdd_v4.irid id
      ,sdd_v4.notm number_of_times_modified
      ,sdd_v4.types
FROM   sdd_vli sdd_v4
  UNION ALL
SELECT sdd_v5.changed_by
      ,sdd_v5.created_by
      ,sdd_v5.date_changed
      ,sdd_v5.date_created
      ,sdd_v5.irid id
      ,sdd_v5.notm number_of_times_modified
      ,sdd_v5.types
FROM   sdd_vlu sdd_v5
  UNION ALL
SELECT sdd_vo.changed_by
      ,sdd_vo.created_by
      ,sdd_vo.date_changed
      ,sdd_vo.date_created
      ,sdd_vo.irid id
      ,sdd_vo.notm number_of_times_modified
      ,sdd_vo.types
FROM   sdd_vou sdd_vo
  UNION ALL
SELECT sdd_vw.changed_by
      ,sdd_vw.created_by
      ,sdd_vw.date_changed
      ,sdd_vw.date_created
      ,sdd_vw.irid id
      ,sdd_vw.notm number_of_times_modified
      ,sdd_vw.types
FROM   sdd_vwtab sdd_vw
  UNION ALL
SELECT sdd_wa.changed_by
      ,sdd_wa.created_by
      ,sdd_wa.date_changed
      ,sdd_wa.date_created
      ,sdd_wa.irid id
      ,sdd_wa.notm number_of_times_modified
      ,sdd_wa.types
FROM   sdd_wat sdd_wa
  UNION ALL
SELECT sdd_wi.changed_by
      ,sdd_wi.created_by
      ,sdd_wi.date_changed
      ,sdd_wi.date_created
      ,sdd_wi.irid id
      ,sdd_wi.notm number_of_times_modified
      ,sdd_wi.types
FROM   sdd_win sdd_wi
  UNION ALL
SELECT sdd_w1.changed_by
      ,sdd_w1.created_by
      ,sdd_w1.date_changed
      ,sdd_w1.date_created
      ,sdd_w1.irid id
      ,sdd_w1.notm number_of_times_modified
      ,sdd_w1.types
FROM   sdd_wit sdd_w1
  UNION ALL
SELECT sdd_wm.changed_by
      ,sdd_wm.created_by
      ,sdd_wm.date_changed
      ,sdd_wm.date_created
      ,sdd_wm.irid id
      ,sdd_wm.notm number_of_times_modified
      ,sdd_wm.types
FROM   sdd_wmt sdd_wm
WITH CHECK OPTION
/
prompt Creating view RM_EXPRESSION_PROPERTY_USAGES...
CREATE OR REPLACE FORCE VIEW rm_expression_property_usages AS
SELECT rm$1.a01 changed_by
      ,rm$1.n02 context
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.p01 exp_seq
      ,rm$1.n03 expression
      ,rm$1.id
      ,rm$1.n01 number_of_times_modified
      ,rm$1.n04 property
      ,rm$1.n05 temp
      ,rm$1.p02 trv_seq
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 63
WITH CHECK OPTION
/
prompt Creating view RM_EXPRESSIONS...
CREATE OR REPLACE FORCE VIEW rm_expressions AS
SELECT rm$1.n02 assertion
      ,rm$1.n03 bind_context
      ,rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.n04 message_parameter
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a03 syntax
      ,rm$1.a20 text
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 62
WITH CHECK OPTION
/
prompt Creating view RM_FEATURES...
CREATE OR REPLACE FORCE VIEW rm_features AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.n04 defined_against
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.n05 of_domain
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.ty types
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty IN (3
       ,16
       ,20
       ,39
       ,48)
  UNION ALL
SELECT rm$ass.changed_by
      ,rm$ass.created_by
      ,rm$ass.date_changed
      ,rm$ass.date_created
      ,rm$ass.defined_against
      ,rm$ass.hack_default
      ,rm$ass.id
      ,rm$ass.name
      ,rm$ass.number_of_times_modified
      ,rm$ass.of_domain
      ,rm$ass.plural_name
      ,rm$ass.product
      ,rm$ass.short_name
      ,rm$ass.source_ref
      ,rm$ass.supertypes
      ,rm$ass.types
      ,rm$ass.user_extension
FROM   rm$assertions rm$ass
WITH CHECK OPTION
/
prompt Creating view RM_LINK_PROPERTIES...
CREATE OR REPLACE FORCE VIEW rm_link_properties AS
SELECT rm$1.n10 arc_no
      ,rm$1.a09 case_mode
      ,rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.n04 defined_against
      ,rm$1.n06 descriptor_sequence
      ,rm$1.a10 displayed
      ,rm$1.a11 enforce_lov
      ,rm$1.a17 friendly_name
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a12 is_stored
      ,rm$1.n11 link_type
      ,rm$1.a13 maintained
      ,rm$1.a14 mandatory
      ,rm$1.n12 max_cardinality
      ,rm$1.n13 min_cardinality
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.n05 of_domain
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.n07 property_group
      ,rm$1.n08 report_seq
      ,rm$1.n09 sequence_in_type
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.ty types
      ,rm$1.a16 update_mode
      ,rm$1.a15 updateable
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty = 16
WITH CHECK OPTION
/
prompt Creating view RM_LINK_TYPES...
CREATE OR REPLACE FORCE VIEW rm_link_types AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.ty types
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty = 12
WITH CHECK OPTION
/
prompt Creating view RM_MESSAGE_USAGES...
CREATE OR REPLACE FORCE VIEW rm_message_usages AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n02 nls_code
      ,rm$1.a04 nls_utility
      ,rm$1.n01 number_of_times_modified
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 64
WITH CHECK OPTION
/
prompt Creating view RM_NAMED_ELEMENTS...
CREATE OR REPLACE FORCE VIEW rm_named_elements AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty IN (2
       ,3
       ,4
       ,5
       ,8
       ,9
       ,10
       ,11
       ,12
       ,13
       ,14
       ,16
       ,18
       ,19
       ,20
       ,21
       ,24
       ,27
       ,30
       ,37
       ,38
       ,39
       ,41
       ,45
       ,47
       ,48
       ,49
       ,52
       ,59
       ,61
       ,66)
  UNION ALL
SELECT rm$ass.changed_by
      ,rm$ass.created_by
      ,rm$ass.date_changed
      ,rm$ass.date_created
      ,rm$ass.id
      ,rm$ass.name
      ,rm$ass.number_of_times_modified
      ,rm$ass.plural_name
      ,rm$ass.short_name
      ,rm$ass.source_ref
      ,rm$ass.types
FROM   rm$assertions rm$ass
WITH CHECK OPTION
/
prompt Creating view RM_PROPERTIES...
CREATE OR REPLACE FORCE VIEW rm_properties AS
SELECT rm$1.a09 case_mode
      ,rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.n04 defined_against
      ,rm$1.n06 descriptor_sequence
      ,rm$1.a10 displayed
      ,rm$1.a11 enforce_lov
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a12 is_stored
      ,rm$1.a13 maintained
      ,rm$1.a14 mandatory
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.n05 of_domain
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.n07 property_group
      ,rm$1.n08 report_seq
      ,rm$1.n09 sequence_in_type
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.ty types
      ,rm$1.a16 update_mode
      ,rm$1.a15 updateable
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty IN (3
       ,16)
WITH CHECK OPTION
/
prompt Creating view RM_PROPERTY_MAPS...
CREATE OR REPLACE FORCE VIEW rm_property_maps AS
SELECT rm$1.a01 changed_by
      ,rm$1.n02 context
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.n03 in_column
      ,rm$1.n01 number_of_times_modified
      ,rm$1.n04 property
      ,rm$1.n05 row_type
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 15
WITH CHECK OPTION
/
prompt Creating view RM_REPOSITORIES...
CREATE OR REPLACE FORCE VIEW rm_repositories AS
SELECT rm$rep.changed_by
      ,rm$rep.code_version
      ,rm$rep.created_by
      ,rm$rep.date_changed
      ,rm$rep.date_created
      ,rm$rep.id
      ,rm$rep.id_offset
      ,rm$rep.nls_language
      ,rm$rep.number_of_times_modified
      ,rm$rep.owner_name
      ,rm$rep.schema_version
      ,rm$rep.types
FROM   rm$repositories rm$rep
WITH CHECK OPTION
/
prompt Creating view RM_SQL_COLUMNS...
CREATE OR REPLACE FORCE VIEW rm_sql_columns AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.p01 data_length
      ,rm$1.p02 data_precision
      ,rm$1.p03 data_scale
      ,rm$1.a06 data_type
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.n03 in_table
      ,rm$1.a07 map_constraint
      ,rm$1.a03 name
      ,rm$1.a08 nullable
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.n04 seq
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n05 system_use
      ,rm$1.n06 temp
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 14
WITH CHECK OPTION
/
prompt Creating view RM_SQL_ROW_TYPES...
CREATE OR REPLACE FORCE VIEW rm_sql_row_types AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 table_mapped
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 13
WITH CHECK OPTION
/
prompt Creating view RM_SQL_TABLES...
CREATE OR REPLACE FORCE VIEW rm_sql_tables AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.id
      ,rm$1.n03 init_trans
      ,rm$1.a06 install_rows
      ,rm$1.n04 max_trans
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.n05 pct_free
      ,rm$1.n06 pct_used
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n07 storage_initial
      ,rm$1.n08 storage_maxextents
      ,rm$1.n09 storage_minextents
      ,rm$1.n10 storage_next
      ,rm$1.n11 storage_pctincrease
      ,rm$1.ty types
FROM   rm$1 rm$1
WHERE  rm$1.ty = 9
WITH CHECK OPTION
/
prompt Creating view RM_TYPES...
CREATE OR REPLACE FORCE VIEW rm_types AS
SELECT rm$1.a01 changed_by
      ,rm$1.a02 created_by
      ,rm$1.d01 date_changed
      ,rm$1.d02 date_created
      ,rm$1.a06 hack_default
      ,rm$1.id
      ,rm$1.a03 name
      ,rm$1.n01 number_of_times_modified
      ,rm$1.a04 plural_name
      ,rm$1.a07 product
      ,rm$1.a05 short_name
      ,rm$1.n02 source_ref
      ,rm$1.n03 supertypes
      ,rm$1.ty types
      ,rm$1.a08 user_extension
FROM   rm$1 rm$1
WHERE  rm$1.ty IN (4
       ,8
       ,12
       ,41)
WITH CHECK OPTION
/
prompt Creating view RM_VIOLATIONS...
CREATE OR REPLACE FORCE VIEW rm_violations AS
SELECT rm$vio.activity
      ,rm$vio.assertion
      ,rm$vio.changed_by
      ,rm$vio.created_by
      ,rm$vio.date_changed
      ,rm$vio.date_created
      ,rm$vio.element
      ,rm$vio.id
      ,rm$vio.number_of_times_modified
      ,rm$vio.p0
      ,rm$vio.p1
      ,rm$vio.p2
      ,rm$vio.p3
      ,rm$vio.p4
      ,rm$vio.p5
      ,rm$vio.p6
      ,rm$vio.p7
      ,rm$vio.pok
      ,rm$vio.property
      ,rm$vio.types
FROM   rm$violations rm$vio
WITH CHECK OPTION
/
rem 
rem $Header: cdapirvw1.sql,v 1.6 97/07/09 15:25:31 cvanes: Exp $ 
rem 
Rem  Copyright (c) 1995 by Oracle Corporation 
Rem    NAME
Rem      cdapirvw1.sql - Hand written repository views
Rem    DESCRIPTION
Rem      Hand written views NOT generated from congenins 
Rem    RETURNS
Rem 
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem    MODIFIED   (MM/DD/YY)
Rem     cvanes     02/11/97 -  Add col to rm_text_type 
Rem     cvanes     09/11/96 -  add short_name_3d to CIUE_ASSOCIATION_TYPES 
Rem     cvanes     05/07/96 -  Changes for 2.0.1 
Rem     cvanes     03/22/96 -  fix CIUE_ELEMENT_TYPES & CIUE_ASSOCIATION_TYPES 
Rem     aheath     02/14/95 -  add in changes applied by various patches 
Rem     aheath     02/13/95 -  Changes for user extensibility 
Rem     aheath     02/08/95 -  Creation 
prompt Creating view CI_VIOLATIONS...
CREATE OR REPLACE FORCE VIEW ci_violations AS
SELECT vi.element
      ,an.facility
      ,an.code
      ,vi.p0
      ,vi.p1
      ,vi.p2
      ,vi.p3
      ,vi.p4
      ,vi.p5
      ,vi.p6
      ,vi.p7
      ,vi.pok
      ,an.warning
FROM   rm_violations vi
      ,rm_assertions an
      ,rm_activities ac
WHERE  an.id = vi.assertion
   and an.enabled='Y'
   and vi.activity=ac.id
   and ac.open_child is null
/

prompt Creating RM_DATA_TYPE_VALUES view...

CREATE OR REPLACE FORCE VIEW rm_data_type_values as
  ( select v.did for_data_type,
           v.did did,
           v.seq seq,
           v.dev_value dev_value,
           v.dev_value lo_value,
           v.nls_value nls_value
      from rm$nls_data_type_values v,
           rm$repositories         r
     where v.nls_language = r.nls_language
  )
/

prompt Creating RM_PROPERTY_RANGES view...

CREATE OR REPLACE FORCE VIEW rm_property_ranges as
  (
    select pid      for_property,
           lo_value lo_value,
           hi_value hi_value
      from rm$property_ranges
  )
/

prompt Creating RM_PROPERTY_EXTENSIONS view...

CREATE OR REPLACE FORCE VIEW rm_property_extensions as
  ( select px.pid              for_property,
           np.nls_name         nls_name,
           np.nls_hint         nls_hint,
           px.dev_default      dev_default,
           np.nls_default      nls_default,
           px.display_sequence display_sequence,
           px.help_tag         help_tag,
           px.property_group   property_group,
           px.data_type        display_data_type,
           px.length           display_length,
           px.precision        display_precision,
           px.scale            display_scale
      from rm$nls_properties      np,
           rm$property_extensions px,
           rm_repositories        r
     where np.nls_language = r.nls_language
           and np.pid = px.pid
  )
/


prompt Creating RM_ELEMENT_TYPE_EXTENSIONS view...

CREATE OR REPLACE FORCE VIEW rm_element_type_extensions as
  ( select ex.etid            for_type,
           ne.nls_name        nls_name,
           ne.nls_plural_name nls_plural_name,
           ex.help_tag        help_tag
      from rm$nls_element_types       ne,
           rm$element_type_extensions ex,
           rm_repositories            r
     where ne.etid = ex.etid
           and ne.nls_language = r.nls_language
  )
/

prompt Creating RM_TEXT_TYPES view...

CREATE OR REPLACE FORCE VIEW rm_text_types as
  ( select ntt.text_type text_type,
           tt.max_length max_length,
           ntt.nls_desc  nls_desc,
     tt.is_extended is_extended,
     tt.is_published is_published,
           tt.editor_type editor_type
      from rm$nls_text_types ntt,
           rm$text_types     tt,
           rm$repositories   r
     where ntt.nls_language = r.nls_language
           and ntt.text_type = tt.text_type
  )
/
prompt Creating RM_TEXT_USAGES view...

CREATE OR REPLACE FORCE VIEW rm_text_usages as
  ( select u.etid         element_type,
           u.seq          seq,
           u.text_type    text_type,
           t.max_length   max_length,
           t.nls_desc     nls_desc,
           u.is_extended  is_extended,
           u.is_published is_published
      from rm_text_types t,
           rm$text_usages u
     where t.text_type = u.text_type
  )
/

prompt Creating view CIUE_TEXT_TYPES...

CREATE OR REPLACE FORCE VIEW ciue_text_types as
select
       tt.text_type        text_type,
       tt.max_length       max_length,
       tt.nls_desc         description,
       tt.is_extended      is_extended,
       tt.is_published     is_published
  from
       rm_text_types tt
/

prompt Creating view CIUE_TEXT_USAGES...

CREATE OR REPLACE FORCE VIEW ciue_text_usages as
select * from rm_text_usages
/

prompt Creating view CIUE_ELEMENT_TYPES...

-- CvE 27-Apr-2000 Bug fix 1280375
CREATE OR REPLACE FORCE VIEW ciue_element_types as
select
       et.id                                                id,
       et.types                                             types,
       et.short_name                                        short_name,
       et.name                                              long_name,
       etx.nls_name                                         nls_name,
       etx.nls_plural_name                                  nls_plural_name,
       et.name                                              name,
       et.plural_name                                       plural_name,
       rtrim(et.product)||'_'||rtrim(upper(et.plural_name)) view_name,
       rtrim(et.product)||'O'||rtrim(upper(et.name))        package_name,
       substr(et.user_extension,1,1)                        is_user_type,
       substr(et.user_extension,2,1)                        is_extended,
       substr(et.user_extension,3,1)                        is_published
  from rm_element_type_extensions etx,
       rm_element_types et
 where etx.for_type = et.id
   and et.product   = 'CI'
   and et.abstract  = 'N'
   and (et.is_primary = 'Y'                                  -- Get all PACs
       or et.short_name in ('PLM', 'SLV', 'SMC', 'SUB')      -- Get weird PAC/SACs
       or  EXISTS ( select NULL                              -- Get SACs
                    from   ci_element_types cet
                    where  et.short_name = cet.short_name
                      and  cet.product = 'CI'
                      and  cet.supertype = 'SAC') )
/

prompt Creating view CIUE_ASSOCIATION_TYPES...

CREATE OR REPLACE FORCE VIEW ciue_association_types as
select
       et.id                                                id,
       et.types                                             types,
       et.short_name                                        short_name,
       et.name                                              long_name,
       etx.nls_name                                         nls_name,
       etx.nls_plural_name                                  nls_plural_name,
       et.name                                              name,
       et.plural_name                                       plural_name,
       rtrim(et.product)||'_'||rtrim(upper(et.plural_name)) view_name,
       rtrim(et.product)||'O'||rtrim(upper(et.name))        package_name,
       vsl.vsl_use_3d                                       short_name_3d,
       etpo.id                                              part_of_reference,
       vsl.vsl_part_of                                      part_of_short_name,
       etpo.name                                            part_of_name,
       nvl(vsl.vsl_part_degree,'M')                         part_of_degree,
       etuo.id                                              use_of_reference,
       vsl.vsl_use_of                                       use_of_short_name,
       etuo.name                                            use_of_name,
       nvl(vsl.vsl_use_degree,'M')                          use_of_degree,
       vsl.vsl_part_type                                    type_of_short_name,
       etto.name                                            type_of_name,
       nvl(vsl.vsl_part_type_degree,'M')                    type_of_degree,
       vsl.vsl_for_matrix_diagrammer                        is_for_matrix,
       substr(et.user_extension,1,1)                        is_user_type,
       substr(et.user_extension,2,1)                        is_extended,
       substr(et.user_extension,3,1)                        is_published
  from rm_element_types etpo,
       rm_element_types etuo,
       rm_element_types etto,
       rm_element_type_extensions etx,
       rm_element_types et,
       sdw_valid_structure_elements vsl
 where
       et.short_name = vsl.vsl_type
       and etx.for_type = et.id
       and etpo.short_name = vsl.vsl_part_of
       and etuo.short_name = vsl.vsl_use_of
       and etto.short_name(+) = vsl.vsl_part_type
       and nvl(et.abstract,'N') = 'N'
       and et.product      = 'CI'
       and etpo.product    = 'CI'
       and etuo.product    = 'CI'
       and etto.product(+) = 'CI'
/

prompt Creating view CIUE_PROPERTIES...

CREATE OR REPLACE FORCE VIEW ciue_properties as
select
       py.id                                         id,
       py.types                                      types,
       et.id                                         for_element_type,
       et.short_name                                 element_type_short_name,
       et.name                                       element_type_name,
       py.name                                       name,
       pyx.nls_name                                  display_name,
       pyx.display_data_type                         display_datatype,
       pyx.display_length                            display_length,
       pyx.display_precision                         display_precision,
       pyx.display_scale                             display_scale,
       py.mandatory                                  is_mandatory,
       py.case_mode                                  case_mode,
       pyx.display_sequence                          display_sequence,
       nvl(py.displayed,'N')                         is_displayed,
       decode(py.update_mode,'U','Y','N')            is_updateable,
       substr(py.user_extension,1,1)                 is_user_property,
       substr(py.user_extension,2,1)                 is_extended,
       substr(py.user_extension,3,1)                 is_published,
       sc.seq                                        ue_screen_sequence,
       st.name                                       base_table,
       sc.name                                       base_column
  from
       rm_property_extensions pyx,
       rm_properties py,
       rm_sql_columns   sc,
       rm_property_maps pm,
       rm_element_types et,
       rm_sql_tables st
 where pm.context = et.id
   and sc.id      = pm.in_column
   and sc.in_table = st.id
   and sc.system_use = 999
   and py.id = pm.property
   and pyx.for_property = py.id
/

prompt Creating view CI_TRANSFERABLE_ELEMENT_TYPES...

CREATE OR REPLACE FORCE VIEW ci_transferable_element_types as
select
       et.id                                                id,
       et.types                                             types,
       et.short_name                                        short_name,
       etx.nls_name                                         name,
       etx.nls_plural_name                                  plural_name,
       rtrim(et.product)||'_'||rtrim(upper(et.plural_name)) view_name,
       rtrim(et.product)||'O'||rtrim(upper(et.name))        package_name,
       substr(et.user_extension,1,1)                        is_user_type,
       substr(et.user_extension,2,1)                        is_extended,
       substr(et.user_extension,3,1)                        is_published,
       decode(et.short_name,'FUN','N','Y')                  is_shareable
  from rm_element_type_extensions etx,
       rm_element_types et
 where etx.for_type = et.id
   and et.short_name <> 'UEE'
   and (
        et.short_name = 'FUN'
        or exists(select null
                    from rm_element_types et2
                   where et2.id = et.supertypes
                         and et2.short_name in ('SHR','UEE')
                 )
        )
/

prompt Recreating view RM_NLS_MESSAGES...

CREATE OR REPLACE FORCE VIEW rm_nls_messages as
  select
          m.utility
         ,m.code
         ,m.severity
         ,m.text
    from
          rm$nls_messages  m
         ,rm$repositories  r
   where m.lang_id   = r.nls_language
/
