repo.Index_union - V
type: V ( view ), modify_date: 2022-01-05 18:06:35
RepoObject_guid: 2590291C-9D61-EB11-84DC-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
1 |
|
|
||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
Indexes
PK_Index_union
-
IndexSemanticGroup: no_group
-
[column-index_guid]; uniqueidentifier
-
-
PK, Unique, Real: 1, 1, 0
Column Details
_
sql_modules_definition
repo.Index_union - V script
CREATE View repo.Index_union
As
--
Select
T1.index_guid
, T1.parent_RepoObject_guid
, T1.index_name
, T1.index_type
, T1.is_index_unique
, T1.is_index_primary_key
, T1.is_index_disabled
, T2.IndexPatternColumnGuid
, referenced_index_guid = Null
, is_index_real = Cast(1 As Bit)
From
repo_sys.Index_unique As T1
Left Join
repo.Index_unique_IndexPatternColumnGuid As T2
On
T2.index_guid = T1.index_guid
Union All
Select
T1.index_guid
, T1.parent_RepoObject_guid
, T1.index_name
, T1.index_type
, T1.is_index_unique
, T1.is_index_primary_key
, T1.is_index_disabled
, T2.IndexPatternColumnGuid
, T1.referenced_index_guid
, is_index_real = Cast(0 As Bit)
From
repo.Index_virtual As T1
Left Join
repo.Index_virtual_IndexPatternColumnGuid As T2
On
T2.index_guid = T1.index_guid
Union All
Select
T1.index_guid
, T1.RepoObject_guid
, T1.index_name
, index_type = Null
, T1.is_index_unique
, T1.is_index_primary_key
, is_index_disabled = Cast(0 As Bit)
, T2.IndexPatternColumnGuid
, referenced_index_guid = Null --maybe we need this later?
, is_index_real = Cast(1 As Bit)
From
repo.Index_ssas_T As T1
Left Join
repo.Index_ssas_IndexPatternColumnGuid As T2
On
T2.index_guid = T1.index_guid