reference.RepoObject_ReferenceTree_referenced_30_0 - V

type: V ( view ), modify_date: 2021-12-16 11:41:19

RepoObject_guid: DAC7D500-ECF5-EB11-850C-A81E8446D5B0

Description

Examples

Entity Diagram

entity-reference.repoobject_referencetree_referenced_30_0

Columns

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

1

uniqueidentifier

NOT NULL

2

uniqueidentifier

NULL

int

NULL

nvarchar(261)

NULL

nvarchar(257)

NULL

nvarchar(261)

NULL

nvarchar(257)

NULL

Foreign Key Diagram

entity_1_1_fk-reference.repoobject_referencetree_referenced_30_0

References

Object Reference Diagram - 1 1

entity_1_1_objectref-reference.repoobject_referencetree_referenced_30_0

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-reference.repoobject_referencetree_referenced_30_0

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-reference.repoobject_referencetree_referenced_30_0

Column Reference Diagram

entity_1_1_colref-reference.repoobject_referencetree_referenced_30_0

Indexes

PK_RepoObject_ReferenceTree_referenced_30_0

idx_RepoObject_ReferenceTree_referenced_30_0__2

Column Details

_

RepoObject_guid

1

RepoObject_guid

uniqueidentifier

NOT NULL

Referenced_guid

2

Referenced_guid

uniqueidentifier

NULL

Referenced_Depth

Referenced_Depth

int

NULL

Referenced_fullname

Referenced_fullname

nvarchar(261)

NULL

Referenced_fullname2

Referenced_fullname2

nvarchar(257)

NULL

RepoObject_fullname

RepoObject_fullname

nvarchar(261)

NULL

Description

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


RepoObject_fullname2

RepoObject_fullname2

nvarchar(257)

NULL

sql_modules_definition

reference.RepoObject_ReferenceTree_referenced_30_0 - V script
CREATE View [reference].[RepoObject_ReferenceTree_referenced_30_0]
As
Select
    ro.RepoObject_guid
  , tree.Referenced_guid
  , RepoObject_fullname  = Max ( ro.RepoObject_fullname )
  , RepoObject_fullname2 = Max ( ro.RepoObject_fullname2 )
  , Referenced_fullname  = Max ( tree.Referenced_fullname )
  , Referenced_fullname2 = Max ( tree.Referenced_fullname2 )
  , Referenced_Depth     = Min ( tree.Referenced_Depth )
From
    repo.RepoObject_gross                                                                       As ro
    Cross Apply reference.ftv_RepoObject_ReferenceTree_referenced ( ro.RepoObject_guid, 30, 0 ) As tree
Where
    ro.is_in_reference = 1
Group By
    ro.RepoObject_guid
  , tree.Referenced_guid