workflow.Biml_Package - V

type: V ( view ), modify_date: 2022-09-08 16:17:27

RepoObject_guid: A6BCD983-91FA-EB11-850E-A81E8446D5B0

Description

Examples

Entity Diagram

entity-workflow.biml_package

Columns

Table 1. Columns of workflow.Biml_Package - V
PK Column Name Data Type NULL? ID

id

int

NOT NULL

nvarchar(max)

NULL

nvarchar(4000)

NULL

nvarchar(500)

NULL

Foreign Key Diagram

entity_1_1_fk-workflow.biml_package

References

Referencing Objects

Object Reference Diagram - 1 1

entity_1_1_objectref-workflow.biml_package

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-workflow.biml_package

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-workflow.biml_package

Column Reference Diagram

entity_1_1_colref-workflow.biml_package

Indexes

idx_Biml_Package__1

  • IndexSemanticGroup: no_group

  • PK, Unique, Real: 0, 0, 0

Column Details

_

id

id

int

NOT NULL

Referenced Columns

Package_Biml

Package_Biml

nvarchar(max)

NULL

Package_Description

Package_Description

nvarchar(4000)

NULL

Package_Name

Package_Name

nvarchar(500)

NULL

sql_modules_definition

workflow.Biml_Package - V script
CREATE View workflow.Biml_Package
As
Select
    T1.id
  , Package_Name        = Max ( T1.Name )
  , Package_Description = Max ( T1.Description )
  , Package_Biml        =
  --
  Coalesce (
               Max ( T1.Package_Biml )
             , Concat (
                          '<Package Name="'
                        , Max ( T1.Name )
                        , '" Language="None">'
                        , Char ( 13 ) + Char ( 10 )
                        , '<Tasks>'
                        , Char ( 13 ) + Char ( 10 )
                        , String_Agg ( Cast(T2.TaskBiml As NVarchar(Max)), Char ( 13 ) + Char ( 10 )) Within Group(Order By
                                                                                                                       T2.TaskBiml)
                        , Char ( 13 ) + Char ( 10 )
                        , '</Tasks>'
                        , Char ( 13 ) + Char ( 10 )
                        , '</Package>'
                      )
           )
From
    workflow.Workflow      As T1
    Left Join
        workflow.Biml_Task As T2
            On
            T2.Workflow_id = T1.id
Where
    T1.is_active = 1
Group By
    T1.id