reference.RepoObjectColumn_reference_additional - V

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

RepoObject_guid: 7CDAAA1B-681B-EC11-8520-A81E8446D5B0

Description

Examples

Entity Diagram

entity-reference.repoobjectcolumn_reference_additional

Columns

Table 1. Columns of reference.RepoObjectColumn_reference_additional - V
PK Column Name Data Type NULL? ID

nvarchar(max)

NULL

varchar(30)

NOT NULL

bit

NULL

bit

NULL

bit

NULL

nvarchar(128)

NULL

nvarchar(128)

NOT NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

int

NULL

bit

NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

nvarchar(128)

NOT NULL

char(2)

NULL

nvarchar(128)

NULL

nvarchar(128)

NOT NULL

nvarchar(128)

NULL

nvarchar(128)

NULL

int

NULL

bit

NULL

uniqueidentifier

NULL

uniqueidentifier

NULL

nvarchar(128)

NOT NULL

char(2)

NULL

Foreign Key Diagram

entity_1_1_fk-reference.repoobjectcolumn_reference_additional

References

Object Reference Diagram - 1 1

entity_1_1_objectref-reference.repoobjectcolumn_reference_additional

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-reference.repoobjectcolumn_reference_additional

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-reference.repoobjectcolumn_reference_additional

Column Reference Diagram

entity_1_1_colref-reference.repoobjectcolumn_reference_additional

Indexes

idx_RepoObjectColumn_reference_additional__1

idx_RepoObjectColumn_reference_additional__2

idx_RepoObjectColumn_reference_additional__3

idx_RepoObjectColumn_reference_additional__4

Column Details

_

definition

definition

nvarchar(max)

NULL

InformationSource

InformationSource

varchar(30)

NOT NULL

is_computed

is_computed

bit

NULL

is_referenced_object

is_referenced_object

bit

NULL

is_referencing_object_equal_referenced_object

is_referencing_object_equal_referenced_object

bit

NULL

referenced_column_name

referenced_column_name

nvarchar(128)

NULL

referenced_entity_name

referenced_entity_name

nvarchar(128)

NOT NULL

referenced_external_AntoraComponent

referenced_external_AntoraComponent

nvarchar(128)

NULL

referenced_external_AntoraModule

referenced_external_AntoraModule

nvarchar(128)

NULL

referenced_id

referenced_id

int

NULL

referenced_is_external

referenced_is_external

bit

NULL

referenced_RepoObject_guid

referenced_RepoObject_guid

uniqueidentifier

NULL

referenced_RepoObjectColumn_guid

referenced_RepoObjectColumn_guid

uniqueidentifier

NULL

referenced_schema_name

referenced_schema_name

nvarchar(128)

NOT NULL

referenced_type

referenced_type

char(2)

NULL

referencing_column_name

referencing_column_name

nvarchar(128)

NULL

referencing_entity_name

referencing_entity_name

nvarchar(128)

NOT NULL

referencing_external_AntoraComponent

referencing_external_AntoraComponent

nvarchar(128)

NULL

referencing_external_AntoraModule

referencing_external_AntoraModule

nvarchar(128)

NULL

referencing_id

referencing_id

int

NULL

referencing_is_external

referencing_is_external

bit

NULL

referencing_RepoObject_guid

referencing_RepoObject_guid

uniqueidentifier

NULL

referencing_RepoObjectColumn_guid

referencing_RepoObjectColumn_guid

uniqueidentifier

NULL

referencing_schema_name

referencing_schema_name

nvarchar(128)

NOT NULL

referencing_type

referencing_type

char(2)

NULL

sql_modules_definition

reference.RepoObjectColumn_reference_additional - V script
Create View reference.RepoObjectColumn_reference_additional
As
--
Select
    T1.referenced_RepoObjectColumn_guid
  , T1.referencing_RepoObjectColumn_guid
  , T1.referenced_RepoObject_guid
  , T1.referenced_id
  , referenced_column_name                        = T1.referenced_Column
  , referenced_entity_name                        = T1.referenced_Object
  , referenced_schema_name                        = T1.referenced_Schema
  , T1.referenced_type
  , T1.referenced_external_AntoraComponent
  , T1.referenced_external_AntoraModule
  , T1.referenced_is_external
  , T1.referencing_RepoObject_guid
  , T1.referencing_id
  --, referencing_minor_id                          = roc.SysObjectColumn_column_id
  --, referencing_node_id                           = roc.node_id
  --, referenced_minor_id                           = roc2.SysObjectColumn_column_id
  --, referenced_node_id                            = roc2.node_id
  , referencing_column_name                       = T1.referencing_Column
  , referencing_entity_name                       = T1.referencing_Object
  , referencing_schema_name                       = T1.referencing_Schema
  , T1.referencing_type
  , T1.referencing_external_AntoraComponent
  , T1.referencing_external_AntoraModule
  , T1.referencing_is_external
  , InformationSource                             = 'reference.additional_Reference'
  , is_referencing_object_equal_referenced_object = Cast(Case
                                                             When T1.referenced_RepoObject_guid = T1.referencing_RepoObject_guid
                                                                 Then
                                                                 1
                                                             Else
                                                                 0
                                                         End As Bit)
  --Flag, if the [referenced_RepoObject_guid] is a referenced object in [repo].[RepoObject_reference__union]
  , is_referenced_object                          =
    (
        Select
            Top 1
            Cast(1 As Bit)
        From
            reference.RepoObject_reference_T As ro_r
        Where
            ro_r.referencing_RepoObject_guid    = ro_r.referencing_RepoObject_guid
            And ro_r.referenced_RepoObject_guid = ro_r.referenced_RepoObject_guid
    )
  --, ros.is_hidden
  , is_computed                                   = Cast(Null As Bit)
  , definition                                    = Cast(Null As NVarchar(Max))
From
    reference.additional_Reference_guid As T1
Where
    (
        T1.referenced_is_external     = 0
        Or T1.referencing_is_external = 0
    )
    And Not T1.referenced_RepoObjectColumn_guid Is Null
    And Not T1.referencing_RepoObjectColumn_guid Is Null