ssas.model_json_3613_perspectives_tables_measures - V
type: V ( view ), modify_date: 2021-09-01 07:54:17
RepoObject_guid: 0660D8EE-E90A-EC11-8516-A81E8446D5B0
Columns
PK | Column Name | Data Type | NULL? | ID |
---|---|---|---|---|
1 |
|
|
||
2 |
|
|
||
3 |
|
|
||
4 |
|
|
Indexes
PK_model_json_3613_perspectives_tables_measures
-
IndexSemanticGroup: no_group
-
databasename; nvarchar(128)
-
[column-perspectives_name]; nvarchar(500)
-
[column-perspectives_tables_name]; nvarchar(500)
-
[column-perspectives_tables_measures_name]; nvarchar(500)
-
-
PK, Unique, Real: 1, 1, 0
idx_model_json_3613_perspectives_tables_measures__2
-
IndexSemanticGroup: no_group
-
databasename; nvarchar(128)
-
[column-perspectives_name]; nvarchar(500)
-
[column-perspectives_tables_name]; nvarchar(500)
-
-
PK, Unique, Real: 0, 0, 0
idx_model_json_3613_perspectives_tables_measures__3
-
IndexSemanticGroup: no_group
-
databasename; nvarchar(128)
-
[column-perspectives_name]; nvarchar(500)
-
-
PK, Unique, Real: 0, 0, 0
idx_model_json_3613_perspectives_tables_measures__4
-
IndexSemanticGroup: no_group
-
databasename; nvarchar(128)
-
-
PK, Unique, Real: 0, 0, 0
Column Details
sql_modules_definition
ssas.model_json_3613_perspectives_tables_measures - V script
/*
--get and check existing values
Select
Distinct
j2.[Key]
, j2.Type
From
ssas.model_json_361_perspectives_tables As T1
Cross Apply OpenJson ( T1.perspectives_tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
ORDER BY
j2.[Key]
, j2.Type
Go
Select
T1.*
, j2.*
From
ssas.model_json_361_perspectives_tables As T1
Cross Apply OpenJson ( T1.perspectives_tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
Go
Select
DISTINCT
j2.*
From
ssas.model_json_361_perspectives_tables As T1
Cross Apply OpenJson ( T1.perspectives_tables_measures_ja ) As j1
Cross Apply OpenJson ( j1.Value ) As j2
Where
j2.[Key] = 'measures'
GO
*/
Create View ssas.model_json_3613_perspectives_tables_measures
As
Select
T1.databasename
, T1.perspectives_name
, T1.perspectives_tables_name
, j2.perspectives_tables_measures_name
From
ssas.model_json_361_perspectives_tables As T1
Cross Apply OpenJson ( T1.perspectives_tables_measures_ja ) As j1
Cross Apply
OpenJson ( j1.Value )
With
(
perspectives_tables_measures_name NVarchar ( 500 ) N'$.name'
) As j2