ssas.model_json_3132111_tables_partitions_Part123 - V

type: V ( view ), modify_date: 2021-09-28 17:42:25

RepoObject_guid: B808A66B-7A20-EC11-8524-A81E8446D5B0

Description

Examples

Entity Diagram

entity-ssas.model_json_3132111_tables_partitions_part123

Columns

Table 1. Columns of ssas.model_json_3132111_tables_partitions_Part123 - V
PK Column Name Data Type NULL? ID

nvarchar(128)

NOT NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

nvarchar(max)

NULL

bigint

NULL

bigint

NULL

bigint

NULL

bigint

NULL

bigint

NULL

uniqueidentifier

NOT NULL

nvarchar(max)

NULL

nvarchar(128)

NOT NULL

nvarchar(max)

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

nvarchar(500)

NULL

nvarchar(max)

NULL

Foreign Key Diagram

entity_1_1_fk-ssas.model_json_3132111_tables_partitions_part123

References

Object Reference Diagram - 1 1

entity_1_1_objectref-ssas.model_json_3132111_tables_partitions_part123

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-ssas.model_json_3132111_tables_partitions_part123

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-ssas.model_json_3132111_tables_partitions_part123

Column Reference Diagram

entity_1_1_colref-ssas.model_json_3132111_tables_partitions_part123

Indexes

idx_model_json_3132111_tables_partitions_Part123__1

idx_model_json_3132111_tables_partitions_Part123__2

idx_model_json_3132111_tables_partitions_Part123__3

Column Details

_

databasename

databasename

nvarchar(128)

NOT NULL

Part1

Part1

nvarchar(max)

NULL

Part2

Part2

nvarchar(max)

NULL

Part3

Part3

nvarchar(max)

NULL

PosDot1

PosDot1

bigint

NULL

PosDot2

PosDot2

bigint

NULL

PosFrom

PosFrom

bigint

NULL

PosFromDoublequota

PosFromDoublequota

bigint

NULL

PosFromWhere

PosFromWhere

bigint

NULL

RepoObject_guid

RepoObject_guid

uniqueidentifier

NOT NULL

StringFrom

StringFrom

nvarchar(max)

NULL

tables_name

tables_name

nvarchar(128)

NOT NULL

tables_partitions_annotations_ja

tables_partitions_annotations_ja

nvarchar(max)

NULL

tables_partitions_dataView

tables_partitions_dataView

nvarchar(500)

NULL

tables_partitions_mode

tables_partitions_mode

nvarchar(500)

NULL

tables_partitions_name

tables_partitions_name

nvarchar(500)

NULL

tables_partitions_source_j

tables_partitions_source_j

nvarchar(max)

NULL

sql_modules_definition

ssas.model_json_3132111_tables_partitions_Part123 - V script
CREATE VIEW [ssas].[model_json_3132111_tables_partitions_Part123]
As
Select
    databasename
  , tables_name
  , RepoObject_guid
  , tables_partitions_name
  , tables_partitions_annotations_ja
  , tables_partitions_dataView
  , tables_partitions_mode
  , tables_partitions_source_j
  , PosFrom
  , PosFromDoublequota
  , PosFromWhere
  , StringFrom
  , PosDot1
  , PosDot2
  --why we don't use STRING_SPLIT()
  --The output rows might be in any order. The order is not guaranteed to match the order of the substrings in the input string.
  , Part1 = Iif(PosDot1 > 2 And PosDot2 > PosDot1, Left(StringFrom, PosDot1 - 1), Null)
  , Part2 = Case
                When PosDot1 > 2
                    Then
                    Case
                        When PosDot2 > PosDot1
                            Then
                            Substring ( StringFrom, PosDot1 + 1, PosDot2 - PosDot1 - 1 )
                        Else
                            Left(StringFrom, PosDot1 - 1)
                    End
            End
  , Part3 = Case
                When PosDot1 > 2
                    Then
                    Case
                        When PosDot2 > PosDot1
                            Then
                            Right(StringFrom, Len ( StringFrom ) - PosDot2)
                        Else
                            Right(StringFrom, Len ( StringFrom ) - PosDot1)
                    End
            End
From
    ssas.model_json_313211_tables_partitions_PosDot