workflow.Workflow_SqlUsp_wo_GO - V

type: V ( view ), modify_date: 2022-06-14 10:54:45

RepoObject_guid: 72D4AE2C-C2EB-EC11-8568-A81E8446D5B0

Description

Examples

Entity Diagram

entity-workflow.workflow_sqlusp_wo_go

Columns

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

nvarchar(max)

NOT NULL

nvarchar(max)

NULL

int

NOT NULL

nvarchar(500)

NULL

Foreign Key Diagram

entity_1_1_fk-workflow.workflow_sqlusp_wo_go

References

Object Reference Diagram - 1 1

entity_1_1_objectref-workflow.workflow_sqlusp_wo_go

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-workflow.workflow_sqlusp_wo_go

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-workflow.workflow_sqlusp_wo_go

Column Reference Diagram

entity_1_1_colref-workflow.workflow_sqlusp_wo_go

Indexes

idx_Workflow_SqlUsp_wo_GO__1

Column Details

_

SqlUsp

SqlUsp

nvarchar(max)

NOT NULL

UspList

UspList

nvarchar(max)

NULL

Workflow_id

Workflow_id

int

NOT NULL

Workflow_Name

Workflow_Name

nvarchar(500)

NULL

sql_modules_definition

workflow.Workflow_SqlUsp_wo_GO - V script
Create   View [workflow].[Workflow_SqlUsp_wo_GO]
As
Select
    T1.Workflow_id
  , T1.Workflow_Name
  , SqlUsp =
  --
  Concat (
           --  'USE  ['
           --, dwhdb.dwh_database_name
           --, ']'
           --, Char ( 13 ) + Char ( 10 )
           --, 'GO'
           --, Char ( 13 ) + Char ( 10 )
           ''
           , 'CREATE OR ALTER PROCEDURE '
           , 'dbo'
           , '.'
           , 'usp_'
           , T1.Workflow_Name
           , Char ( 13 ) + Char ( 10 )
           , '@execution_instance_guid UNIQUEIDENTIFIER = NULL --SSIS system variable ExecutionInstanceGUID could be used, any other unique guid is also fine. If NULL, then NEWID() is used to create one'
           , Char ( 13 ) + Char ( 10 )
           , 'AS'
           , Char ( 13 ) + Char ( 10 )
           , 'Begin'
           , Char ( 13 ) + Char ( 10 )
           , 'IF @execution_instance_guid IS Null SET @execution_instance_guid = NEWID();'
           , Char ( 13 ) + Char ( 10 )
           , Char ( 13 ) + Char ( 10 )
           , T1.UspList
           , Char ( 13 ) + Char ( 10 )
           , 'End'
           --, Char ( 13 ) + Char ( 10 )
           --, 'GO'
         )
  , T1.UspList
From
    workflow.Workflow_UspList             As T1
    Cross Join config.ftv_dwh_database () As dwhdb