repo.Index_virtual_IndexPatternColumnGuid - V

type: V ( view ), modify_date: 2021-12-14 19:47:18

RepoObject_guid: 60CE8EB8-5F62-EB11-84DC-A81E8446D5B0

Description

Examples

Entity Diagram

entity-repo.index_virtual_indexpatterncolumnguid

Columns

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

int

NULL

uniqueidentifier

NOT NULL

varchar(8000)

NULL

uniqueidentifier

NULL

Foreign Key Diagram

entity_1_1_fk-repo.index_virtual_indexpatterncolumnguid

References

Object Reference Diagram - 1 1

entity_1_1_objectref-repo.index_virtual_indexpatterncolumnguid

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-repo.index_virtual_indexpatterncolumnguid

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-repo.index_virtual_indexpatterncolumnguid

Column Reference Diagram

entity_1_1_colref-repo.index_virtual_indexpatterncolumnguid

Indexes

idx_Index_virtual_IndexPatternColumnGuid__1

idx_Index_virtual_IndexPatternColumnGuid__2

Column Details

_

ColumnsPerIndex

ColumnsPerIndex

int

NULL

index_guid

index_guid

uniqueidentifier

NOT NULL

Referenced Columns

IndexPatternColumnGuid

IndexPatternColumnGuid

varchar(8000)

NULL

parent_RepoObject_guid

parent_RepoObject_guid

uniqueidentifier

NULL

sql_modules_definition

repo.Index_virtual_IndexPatternColumnGuid - V script
CREATE View repo.Index_virtual_IndexPatternColumnGuid
As
Select
    i.index_guid
  --only one [parent_RepoObject_guid] per index_guid is possible
  , parent_RepoObject_guid = Max ( i.parent_RepoObject_guid )
  , IndexPatternColumnGuid =
  --
  String_Agg ( Cast(ic.RepoObjectColumn_guid As Char(36)), ',' ) Within Group(Order By
                                                                                  Cast(ic.RepoObjectColumn_guid As Char(36)))
  , ColumnsPerIndex        = Count ( * )
From
    repo.Index_virtual           As i
    Inner Join
        repo.IndexColumn_virtual As ic
            On
            i.index_guid = ic.index_guid
Group By
    i.index_guid