repo.Index_referencing_IndexPatternColumnGuid - V

type: V ( view ), modify_date: 2021-08-17 19:39:35

RepoObject_guid: 5ECE8EB8-5F62-EB11-84DC-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo.index_referencing_indexpatterncolumnguid

Columns

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

1

uniqueidentifier

NULL

2

uniqueidentifier

NULL

varchar(8000)

NULL

Foreign Key Diagram

entity_1_1_fk-repo.index_referencing_indexpatterncolumnguid

References

Object Reference Diagram - 1 1

entity_1_1_objectref-repo.index_referencing_indexpatterncolumnguid

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo.index_referencing_indexpatterncolumnguid

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo.index_referencing_indexpatterncolumnguid

Column Reference Diagram

entity_1_1_colref-repo.index_referencing_indexpatterncolumnguid

Indexes

PK_Index_referencing_IndexPatternColumnGuid

idx_Index_referencing_IndexPatternColumnGuid__2

Column Details

_

source_index_guid

1

source_index_guid

uniqueidentifier

NULL

referencing_RepoObject_guid

2

referencing_RepoObject_guid

uniqueidentifier

NULL

referencing_IndexPatternColumnGuid

referencing_IndexPatternColumnGuid

varchar(8000)

NULL

sql_modules_definition

repo.Index_referencing_IndexPatternColumnGuid - V script
/*
if a source_index "HasFullColumnsInReferencing"
we need to know [referencing_IndexPatternColumnGuid]
to filter out different source_index referencing in same referencing column combination

Because that would only lead to multiple indexes with the same column combination in the same RepoObject
*/

CREATE View repo.Index_referencing_IndexPatternColumnGuid
As
Select
    source_index_guid                  = ic.index_guid
  , ic.referencing_RepoObject_guid
  , referencing_IndexPatternColumnGuid =
  --
  String_Agg ( Cast(ic.referencing_RepoObjectColumn_guid As Char(36)), ',' ) Within Group(Order By
                                                                                              Cast(ic.referencing_RepoObjectColumn_guid As Char(36)))
From
    repo.IndexColumn_ReferencedReferencing_HasFullColumnsInReferencing_T As ic
Group By
    ic.index_guid
  , ic.referencing_RepoObject_guid