reference.additional_Reference_ObjectColumn - V

type: V ( view ), modify_date: 2021-09-22 08:02:58

RepoObject_guid: CCB17B93-D017-EC11-851C-A81E8446D5B0

Description

Examples

Entity Diagram

entity-reference.additional_reference_objectcolumn

Columns

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

1

nvarchar(128)

NOT NULL

2

nvarchar(128)

NOT NULL

3

nvarchar(128)

NOT NULL

4

nvarchar(128)

NOT NULL

5

nvarchar(128)

NULL

Foreign Key Diagram

entity_1_1_fk-reference.additional_reference_objectcolumn

References

Object Reference Diagram - 1 1

entity_1_1_objectref-reference.additional_reference_objectcolumn

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-reference.additional_reference_objectcolumn

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-reference.additional_reference_objectcolumn

Column Reference Diagram

entity_1_1_colref-reference.additional_reference_objectcolumn

Indexes

PK_additional_Reference_ObjectColumn

Column Details

_

AntoraComponent

1

AntoraComponent

nvarchar(128)

NOT NULL

AntoraModule

2

AntoraModule

nvarchar(128)

NOT NULL

SchemaName

3

SchemaName

nvarchar(128)

NOT NULL

ObjectName

4

ObjectName

nvarchar(128)

NOT NULL

ColumnName

5

ColumnName

nvarchar(128)

NULL

sql_modules_definition

reference.additional_Reference_ObjectColumn - V script
CREATE View reference.additional_Reference_ObjectColumn
As
Select
    AntoraComponent = referenced_AntoraComponent
  , AntoraModule    = referenced_AntoraModule
  , SchemaName      = referenced_Schema
  , ObjectName      = referenced_Object
  , ColumnName      = referenced_Column
From
    reference.additional_Reference_is_external
Where
    Not referenced_Column Is Null
    And referenced_is_external  = 1
    And referencing_is_external = 0
Union
Select
    AntoraComponent = referencing_AntoraComponent
  , AntoraModule    = referencing_AntoraModule
  , SchemaName      = referencing_Schema
  , ObjectName      = referencing_Object
  , ColumnName      = referencing_Column
From
    reference.additional_Reference_is_external
Where
    Not referencing_Column Is Null
    And referenced_is_external  = 0
    And referencing_is_external = 1