docs.Unit_1_union - V

type: V ( view ), modify_date: 2022-01-05 18:06:34

RepoObject_guid: B4051757-370F-EC11-8518-A81E8446D5B0

Description

Examples

Entity Diagram

entity-docs.unit_1_union

Columns

Table 1. Columns of docs.Unit_1_union - V
PK Column Name Data Type NULL? ID

nvarchar(257)

NULL

varchar(2)

NULL

nvarchar(128)

NULL

nvarchar(max)

NULL

nvarchar(500)

NULL

nvarchar(max)

NULL

nvarchar(500)

NULL

nvarchar(638)

NOT NULL

uniqueidentifier

NOT NULL

bit

NULL

bit

NULL

bit

NULL

bit

NULL

varchar(7)

NOT NULL

nvarchar(500)

NOT NULL

nvarchar(128)

NULL

nvarchar(128)

NOT NULL

nvarchar(500)

NULL

nvarchar(128)

NULL

Foreign Key Diagram

entity_1_1_fk-docs.unit_1_union

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-docs.unit_1_union

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-docs.unit_1_union

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-docs.unit_1_union

Column Reference Diagram

entity_1_1_colref-docs.unit_1_union

Column Details

_

Object_fullname2

Object_fullname2

nvarchar(257)

NULL

Referencing Columns

Object_Type

Object_Type

varchar(2)

NULL

Referencing Columns

Unit_ColummName

Unit_ColummName

nvarchar(128)

NULL

Referencing Columns

Unit_Description

Unit_Description

nvarchar(max)

NULL

Referencing Columns

Unit_DisplayFolder

Unit_DisplayFolder

nvarchar(500)

NULL

Referencing Columns

Unit_Expression

Unit_Expression

nvarchar(max)

NULL

Referencing Columns

Unit_FormatString

Unit_FormatString

nvarchar(500)

NULL

Referencing Columns

Unit_fullname2

Unit_fullname2

nvarchar(638)

NOT NULL

Referencing Columns

Unit_guid

Unit_guid

uniqueidentifier

NOT NULL

Referencing Columns

Unit_isHidden

Unit_isHidden

bit

NULL

Referencing Columns

Unit_IsKey

Unit_IsKey

bit

NULL

Referencing Columns

Unit_IsSsas

Unit_IsSsas

bit

NULL

Referencing Columns

Unit_IsUnique

Unit_IsUnique

bit

NULL

Referencing Columns

Unit_Metatype

Unit_Metatype

varchar(7)

NOT NULL

Referencing Columns

Unit_Name

Unit_Name

nvarchar(500)

NOT NULL

Referencing Columns

Unit_ObjectName

Unit_ObjectName

nvarchar(128)

NULL

Referencing Columns

Unit_Schema

Unit_Schema

nvarchar(128)

NOT NULL

Referencing Columns

Unit_SummarizeBy

Unit_SummarizeBy

nvarchar(500)

NULL

Referencing Columns

Unit_TypeName

Unit_TypeName

nvarchar(128)

NULL

Referencing Columns

sql_modules_definition

docs.Unit_1_union - V script
CREATE View docs.Unit_1_union
As
Select
    Unit_guid          = roc.RepoObjectColumn_guid
  , Unit_Metatype      = 'column'
  , Unit_Schema        = rof.RepoObject_schema_name
  , Unit_ObjectName    = roc.RepoObject_name
  , Unit_ColummName    = roc.RepoObjectColumn_name
  , Unit_Name          = roc.RepoObjectColumn_name
  , Unit_fullname2     = roc.RepoObjectColumn_fullname2
  , Unit_TypeName      = roc.Repo_user_type_fullname
  , Unit_isHidden      = roc.tabcol_IsHidden
  , Unit_IsSsas        = rof.is_ssas
  , Unit_Description   = roc.Description
  , Unit_DisplayFolder = roc.tabcol_DisplayFolder
  , Unit_Expression    = roc.tabcol_Expression
  , Unit_FormatString  = roc.tabcol_FormatString
  , Unit_IsKey         = roc.tabcol_IsKey
  , Unit_IsUnique      = roc.tabcol_IsUnique
  , Unit_SummarizeBy   = roc.tabcol_SummarizeBy
  , Object_fullname2   = rof.RepoObject_fullname2
  , Object_Type        = rof.SysObject_type
From
    docs.RepoObject_OutputFilter_T  As rof
    Inner Join
        repo.RepoObjectColumn_gross As roc
            On
            roc.RepoObject_guid = rof.RepoObject_guid
Union All
Select
    Unit_guid          = rof.RepoObject_guid
  , Unit_Metatype      = 'object'
  , Unit_Schema        = rof.RepoObject_schema_name
  , Unit_ObjectName    = ro.RepoObject_name
  , Unit_ColummName    = Null
  , Unit_Name          = rof.RepoObject_name
  , Unit_fullname2     = rof.RepoObject_fullname2
  , Unit_TypeName      = rof.SysObject_type_name
  , Unit_isHidden      = ro.tables_isHidden
  , Unit_IsSsas        = rof.is_ssas
  , Unit_Description   = ro.Description
  , Unit_DisplayFolder = Null
  , Unit_Expression    = Null
  , Unit_FormatString  = Null
  , Unit_IsKey         = Null
  , Unit_IsUnique      = Null
  , Unit_SummarizeBy   = Null
  , Object_fullname2   = rof.RepoObject_fullname2
  , Object_Type        = rof.SysObject_type
From
    docs.RepoObject_OutputFilter_T As rof
    Inner Join
        repo.RepoObject_gross      As ro
            On
            ro.RepoObject_guid = rof.RepoObject_guid
Union All
Select
    Unit_guid          = rs.RepoSchema_guid
  , Unit_Metatype      = 'schema'
  , Unit_Schema        = rs.RepoSchema_name
  , Unit_ObjectName    = Null
  , Unit_ColummName    = Null
  , Unit_Name          = rs.RepoSchema_name
  , Unit_fullname2     = rs.RepoSchema_name
  , Unit_TypeName      = Null
  , Unit_isHidden      = Null
  , Unit_IsSsas        = rs.is_ssas
  , Unit_Description   = rs.[RepoSchema_description]
  , Unit_DisplayFolder = Null
  , Unit_Expression    = Null
  , Unit_FormatString  = Null
  , Unit_IsKey         = Null
  , Unit_IsUnique      = Null
  , Unit_SummarizeBy   = Null
  , Object_fullname2   = Null
  , Object_Type        = Null
From
    repo.RepoSchema As rs
Union All
Select
    Unit_guid          = m.Measure_guid
  , Unit_Metatype      = 'measure'
  , Unit_Schema        = m.RepoSchema_name
  , Unit_ObjectName    = m.RepoObject_name
  , Unit_ColummName    = Null
  , Unit_Name          = m.measures_name
  , Unit_fullname2     = m.Measure_fullname2
  , Unit_TypeName      = Null
  , Unit_isHidden      = m.measures_isHidden
  , Unit_IsSsas        = m.is_ssas
  , Unit_Description   = m.Description
  , Unit_DisplayFolder = m.measures_displayFolder
  , Unit_Expression    = m.Expression
  , Unit_FormatString  = m.measures_formatString
  , Unit_IsKey         = Null
  , Unit_IsUnique      = Null
  , Unit_SummarizeBy   = Null
  , Object_fullname2   = m.RepoObject_fullname2
  , Object_Type        = 'U'
From
    repo.Measure As m