repo.RepoObjectColumn_gross2 - V

type: V ( view ), modify_date: 2022-09-05 16:51:19

RepoObject_guid: 43BBCCE5-AD08-EC11-8515-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo.repoobjectcolumn_gross2

Columns

Table 1. Columns of repo.RepoObjectColumn_gross2 - V
PK Column Name Data Type NULL? ID

nvarchar(max)

NULL

nvarchar(max)

NULL

nvarchar(128)

NOT NULL

nvarchar(max)

NULL

bit

NULL

bit

NULL

int

NULL

nvarchar(450)

NULL

nvarchar(4000)

NULL

nvarchar(4000)

NULL

tinyint

NULL

bit

NOT NULL

bit

NULL

bit

NULL

bit

NULL

bit

NULL

bit

NULL

bit

NULL

bit

NULL

int

NOT NULL

int

NOT NULL

bit

NULL

bit

NOT NULL

bit

NULL

int

NOT NULL

bit

NULL

int

NOT NULL

int

NULL

datetime

NOT NULL

bigint

NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

nvarchar(4000)

NULL

int

NULL

nvarchar(max)

NULL

bit

NULL

nvarchar(128)

NULL

nvarchar(max)

NULL

tinyint

NOT NULL

int

NULL

sql_variant

NULL

bit

NOT NULL

bit

NOT NULL

bit

NULL

bit

NULL

sql_variant

NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

bit

NULL

nvarchar(261)

NOT NULL

nvarchar(257)

NOT NULL

uniqueidentifier

NOT NULL

nvarchar(128)

NOT NULL

int

NULL

nvarchar(128)

NOT NULL

char(2)

NOT NULL

int

NULL

nvarchar(520)

NOT NULL

nvarchar(386)

NOT NULL

uniqueidentifier

NOT NULL

nvarchar(128)

NOT NULL

nvarchar(261)

NOT NULL

nvarchar(257)

NOT NULL

int

NULL

datetime

NULL

nvarchar(128)

NOT NULL

int

NOT NULL

nvarchar(128)

NOT NULL

char(2)

NULL

int

NULL

nvarchar(128)

NOT NULL

nvarchar(max)

NULL

nvarchar(500)

NULL

nvarchar(max)

NULL

nvarchar(500)

NULL

bit

NOT NULL

bit

NOT NULL

bit

NOT NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

Foreign Key Diagram

entity_1_1_fk-repo.repoobjectcolumn_gross2

References

Object Reference Diagram - 1 1

entity_1_1_objectref-repo.repoobjectcolumn_gross2

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo.repoobjectcolumn_gross2

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo.repoobjectcolumn_gross2

Column Reference Diagram

entity_1_1_colref-repo.repoobjectcolumn_gross2

Indexes

idx_RepoObjectColumn_gross2__1

idx_RepoObjectColumn_gross2__2

idx_RepoObjectColumn_gross2__3

idx_RepoObjectColumn_gross2__4

idx_RepoObjectColumn_gross2__5

idx_RepoObjectColumn_gross2__6

idx_RepoObjectColumn_gross2__7

idx_RepoObjectColumn_gross2__8

idx_RepoObjectColumn_gross2__9

Column Details

_

AntoraReferencedColumnList

AntoraReferencedColumnList

nvarchar(max)

NULL

AntoraReferencingColumnList

AntoraReferencingColumnList

nvarchar(max)

NULL

Column_name

Column_name

nvarchar(128)

NOT NULL

Description

(case when TRY_CAST([RepoObjectColumn_name] AS [uniqueidentifier]) IS NULL then [RepoObjectColumn_name] else [SysObjectColumn_name] end)


Description

Description

nvarchar(max)

NULL

has_different_sys_names

has_different_sys_names

bit

NULL

Description

(CONVERT([bit],case when [RepoObjectColumn_name]<>[SysObjectColumn_name] then (1) else (0) end))


has_get_referenced_issue

has_get_referenced_issue

bit

NULL

index_column_id

index_column_id

int

NULL

index_name

index_name

nvarchar(450)

NULL

Inheritance_StringAggSeparatorSql

Inheritance_StringAggSeparatorSql

nvarchar(4000)

NULL

InheritanceDefinition

InheritanceDefinition

nvarchar(4000)

NULL

InheritanceType

InheritanceType

tinyint

NULL

is_external

is_external

bit

NOT NULL

is_index_primary_key

is_index_primary_key

bit

NULL

is_persistence_Ignore

is_persistence_Ignore

bit

NULL

is_persistence_NoCompareButUpdate

is_persistence_NoCompareButUpdate

bit

NULL

is_persistence_NoCompareNoUpdate

is_persistence_NoCompareNoUpdate

bit

NULL

is_persistence_NoInsert

is_persistence_NoInsert

bit

NULL

is_query_plan_expression

is_query_plan_expression

bit

NULL

is_repo_managed

is_repo_managed

bit

NULL

is_RepoObject_name_uniqueidentifier

is_RepoObject_name_uniqueidentifier

int

NOT NULL

Description

(case when TRY_CAST([RepoObject_name] AS [uniqueidentifier]) IS NULL then (0) else (1) end)


is_RepoObjectColumn_name_uniqueidentifier

is_RepoObjectColumn_name_uniqueidentifier

int

NOT NULL

Description

(case when TRY_CAST([RepoObjectColumn_name] AS [uniqueidentifier]) IS NULL then (0) else (1) end)


is_required_ColumnMerge

is_required_ColumnMerge

bit

NULL

is_ssas

is_ssas

bit

NOT NULL

is_SysObject_missing

is_SysObject_missing

bit

NULL

is_SysObject_name_uniqueidentifier

is_SysObject_name_uniqueidentifier

int

NOT NULL

Description

(case when TRY_CAST([SysObject_name] AS [uniqueidentifier]) IS NULL then (0) else (1) end)


is_SysObjectColumn_missing

is_SysObjectColumn_missing

bit

NULL

is_SysObjectColumn_name_uniqueidentifier

is_SysObjectColumn_name_uniqueidentifier

int

NOT NULL

Description

(case when TRY_CAST([SysObjectColumn_name] AS [uniqueidentifier]) IS NULL then (0) else (1) end)


isAnyIndexColumn

isAnyIndexColumn

int

NULL

modify_dt

modify_dt

datetime

NOT NULL

node_id

node_id

bigint

NULL

Description

(CONVERT([bigint],[SysObject_id])*(10000))


persistence_source_RepoObject_guid

persistence_source_RepoObject_guid

uniqueidentifier

NULL

persistence_source_RepoObject_guid_via_Column

persistence_source_RepoObject_guid_via_Column

uniqueidentifier

NULL

persistence_source_RepoObjectColumn_guid

persistence_source_RepoObjectColumn_guid

uniqueidentifier

NULL

pk_index_guid

pk_index_guid

uniqueidentifier

NULL

Property_ms_description

Property_ms_description

nvarchar(4000)

NULL

Referencing_Count

Referencing_Count

int

NULL

Repo_default_definition

Repo_default_definition

nvarchar(max)

NULL

Repo_default_is_system_named

Repo_default_is_system_named

bit

NULL

Repo_default_name

Repo_default_name

nvarchar(128)

NULL

Repo_definition

Repo_definition

nvarchar(max)

NULL

Repo_generated_always_type

Repo_generated_always_type

tinyint

NOT NULL

Repo_graph_type

Repo_graph_type

int

NULL

Repo_increment_value

Repo_increment_value

sql_variant

NULL

Repo_is_computed

Repo_is_computed

bit

NOT NULL

Repo_is_identity

Repo_is_identity

bit

NOT NULL

Repo_is_nullable

Repo_is_nullable

bit

NULL

Repo_is_persisted

Repo_is_persisted

bit

NULL

Repo_seed_value

Repo_seed_value

sql_variant

NULL

Repo_user_type_fullname

Repo_user_type_fullname

nvarchar(128)

NULL

Repo_user_type_name

Repo_user_type_name

nvarchar(128)

NULL

Repo_uses_database_collation

Repo_uses_database_collation

bit

NULL

RepoObject_fullname

RepoObject_fullname

nvarchar(261)

NOT NULL

Description

(concat('[',[RepoObject_schema_name],'].[',[RepoObject_name],']'))


RepoObject_fullname2

RepoObject_fullname2

nvarchar(257)

NOT NULL

Description

(concat([RepoObject_schema_name],'.',[RepoObject_name]))


RepoObject_guid

RepoObject_guid

uniqueidentifier

NOT NULL

RepoObject_name

RepoObject_name

nvarchar(128)

NOT NULL

RepoObject_Referencing_Count

RepoObject_Referencing_Count

int

NULL

RepoObject_schema_name

RepoObject_schema_name

nvarchar(128)

NOT NULL

RepoObject_type

RepoObject_type

char(2)

NOT NULL

RepoObjectColumn_column_id

RepoObjectColumn_column_id

int

NULL

RepoObjectColumn_fullname

RepoObjectColumn_fullname

nvarchar(520)

NOT NULL

RepoObjectColumn_fullname2

RepoObjectColumn_fullname2

nvarchar(386)

NOT NULL

RepoObjectColumn_guid

RepoObjectColumn_guid

uniqueidentifier

NOT NULL

RepoObjectColumn_name

RepoObjectColumn_name

nvarchar(128)

NOT NULL

SysObject_fullname

SysObject_fullname

nvarchar(261)

NOT NULL

Description

(concat('[',[SysObject_schema_name],'].[',[SysObject_name],']'))


SysObject_fullname2

SysObject_fullname2

nvarchar(257)

NOT NULL

Description

(concat([SysObject_schema_name],'.',[SysObject_name]))


SysObject_id

SysObject_id

int

NULL

SysObject_modify_date

SysObject_modify_date

datetime

NULL

SysObject_name

SysObject_name

nvarchar(128)

NOT NULL

SysObject_parent_object_id

SysObject_parent_object_id

int

NOT NULL

SysObject_schema_name

SysObject_schema_name

nvarchar(128)

NOT NULL

SysObject_type

SysObject_type

char(2)

NULL

SysObjectColumn_column_id

SysObjectColumn_column_id

int

NULL

SysObjectColumn_name

SysObjectColumn_name

nvarchar(128)

NOT NULL

tabcol_Description

tabcol_Description

nvarchar(max)

NULL

tabcol_DisplayFolder

tabcol_DisplayFolder

nvarchar(500)

NULL

tabcol_Expression

tabcol_Expression

nvarchar(max)

NULL

tabcol_FormatString

tabcol_FormatString

nvarchar(500)

NULL

tabcol_IsHidden

tabcol_IsHidden

bit

NOT NULL

tabcol_IsKey

tabcol_IsKey

bit

NOT NULL

tabcol_IsUnique

tabcol_IsUnique

bit

NOT NULL

tabcol_SummarizeBy

tabcol_SummarizeBy

nvarchar(500)

NULL

tabcol_Type

tabcol_Type

nvarchar(500)

NULL

sql_modules_definition

repo.RepoObjectColumn_gross2 - V script
CREATE View [repo].[RepoObjectColumn_gross2]
As
Select
    roc.RepoObjectColumn_guid
  , roc.Column_name
  , roc.has_different_sys_names
  , roc.Inheritance_StringAggSeparatorSql
  , roc.InheritanceDefinition
  , roc.InheritanceType
  , roc.is_persistence_Ignore
  , roc.is_persistence_NoCompareButUpdate
  , roc.is_persistence_NoCompareNoUpdate
  , roc.is_persistence_NoInsert
  , roc.is_query_plan_expression
  , roc.is_RepoObjectColumn_name_uniqueidentifier
  , roc.is_required_ColumnMerge
  , roc.is_SysObjectColumn_missing
  , roc.is_SysObjectColumn_name_uniqueidentifier
  , roc.persistence_source_RepoObject_guid
  , roc.persistence_source_RepoObjectColumn_guid
  --should be the same like persistence_source_RepoObject_guid,
  --if not, then persistence_source_RepoObjectColumn_guid is invalid and should be deleted
  , persistence_source_RepoObject_guid_via_Column = roc_pers_check.RepoObject_guid
  , roc.Referencing_Count
  , roc.Repo_default_definition
  , roc.Repo_default_is_system_named
  , roc.Repo_default_name
  , roc.Repo_definition
  , roc.Repo_generated_always_type
  , roc.Repo_graph_type
  , roc.Repo_is_computed
  , roc.Repo_is_identity
  , roc.Repo_is_nullable
  , roc.Repo_is_persisted
  , roc.Repo_seed_value
  , roc.Repo_increment_value
  , roc.Repo_user_type_fullname
  , roc.Repo_user_type_name
  , roc.Repo_uses_database_collation
  , roc.RepoObject_guid
  , roc.RepoObjectColumn_column_id
  , roc.RepoObjectColumn_fullname
  , roc.RepoObjectColumn_fullname2
  , roc.RepoObjectColumn_name
  , roc.SysObjectColumn_column_id
  , roc.SysObjectColumn_name
  , roc.has_get_referenced_issue
  , roc.is_repo_managed
  , roc.is_ssas
  , roc.is_external
  , roc.is_RepoObject_name_uniqueidentifier
  , roc.is_SysObject_missing
  , roc.is_SysObject_name_uniqueidentifier
  , roc.modify_dt
  , roc.node_id
  , roc.pk_index_guid
  , roc.RepoObject_fullname
  , roc.RepoObject_fullname2
  , roc.RepoObject_name
  , roc.RepoObject_Referencing_Count
  , roc.RepoObject_schema_name
  , roc.RepoObject_type
  , roc.SysObject_fullname
  , roc.SysObject_fullname2
  , roc.SysObject_id
  , roc.SysObject_modify_date
  , roc.SysObject_name
  , roc.SysObject_schema_name
  , roc.SysObject_type
  , roc.SysObject_parent_object_id
  --based on ro.pk_index_guid
  --in other words: only, if the columns are part of the PK
  , roc.Property_ms_description
  , roc.Description
  , roc.tabcol_Description
  , roc.tabcol_DisplayFolder
  , roc.tabcol_Expression
  , roc.tabcol_FormatString
  , roc.tabcol_IsHidden
  , roc.tabcol_IsKey
  , roc.tabcol_IsUnique
  , roc.tabcol_SummarizeBy
  , roc.tabcol_Type
  , ic.index_column_id
  , ic.index_name
  , ic.is_index_primary_key
  , isAnyIndexColumn                              =
    (
        Select
            Top 1
            1
        From
            repo.IndexColumn_union_T As icu
        Where
            icu.RepoObjectColumn_guid = roc.RepoObjectColumn_guid
    )
  , roc_referenced.AntoraReferencedColumnList
  , roc_referencing.AntoraReferencingColumnList
From
    repo.RepoObjectColumn_gross                    As roc
    Left Outer Join
        repo.IndexColumn_union_T                   As ic
            On
            ic.index_guid                        = roc.pk_index_guid
            And ic.RepoObjectColumn_guid         = roc.RepoObjectColumn_guid

    Left Join
        reference.RepoObjectColumn_ReferencedList  As roc_referenced
            On
            roc_referenced.Referencing_guid      = roc.RepoObjectColumn_guid

    Left Join
        reference.RepoObjectColumn_ReferencingList As roc_referencing
            On
            roc_referencing.Referenced_guid      = roc.RepoObjectColumn_guid

    Left Join
        repo.RepoObjectColumn                      As roc_pers_check
            On
            roc_pers_check.RepoObjectColumn_guid = roc.persistence_source_RepoObjectColumn_guid