workflow.Workflow_ProcedureDependency_T_NotInSortorder - V

type: V ( view ), modify_date: 2021-08-17 20:27:54

RepoObject_guid: 80E72F09-C5FD-EB11-850F-A81E8446D5B0

Description

Examples

Entity Diagram

entity-workflow.workflow_proceduredependency_t_notinsortorder

Columns

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

uniqueidentifier

NOT NULL

uniqueidentifier

NOT NULL

int

NOT NULL

Foreign Key Diagram

entity_1_1_fk-workflow.workflow_proceduredependency_t_notinsortorder

References

Object Reference Diagram - 1 1

entity_1_1_objectref-workflow.workflow_proceduredependency_t_notinsortorder

Object Reference Diagram - Referenced - 30 0

entity_30_0_objectref-workflow.workflow_proceduredependency_t_notinsortorder

Object Reference Diagram - Referencing - 0 30

entity_0_30_objectref-workflow.workflow_proceduredependency_t_notinsortorder

Column Reference Diagram

entity_1_1_colref-workflow.workflow_proceduredependency_t_notinsortorder

Indexes

idx_Workflow_ProcedureDependency_T_NotInSortorder__1

idx_Workflow_ProcedureDependency_T_NotInSortorder__2

idx_Workflow_ProcedureDependency_T_NotInSortorder__3

idx_Workflow_ProcedureDependency_T_NotInSortorder__4

idx_Workflow_ProcedureDependency_T_NotInSortorder__5

Column Details

_

referenced_Procedure_RepoObject_guid

referenced_Procedure_RepoObject_guid

uniqueidentifier

NOT NULL

referencing_Procedure_RepoObject_guid

referencing_Procedure_RepoObject_guid

uniqueidentifier

NOT NULL

sql_modules_definition

workflow.Workflow_ProcedureDependency_T_NotInSortorder - V script
/*
workflow.Workflow_ProcedureDependency_T not redundant entries not yet processed into workflow.WorkflowStep_Sortorder
*/
CREATE View workflow.Workflow_ProcedureDependency_T_NotInSortorder
As
Select
    T1.Workflow_id
  , T1.referenced_Procedure_RepoObject_guid
  , T1.referencing_Procedure_RepoObject_guid
--, is_redundant
From
    workflow.Workflow_ProcedureDependency_T_active As T1
Where
    T1.is_redundant = 0
    And Not Exists
(
    Select
        Expr1 = 1
    From
        workflow.WorkflowStep_Sortorder As T2
    Where
        ( T2.Workflow_id                   = T1.Workflow_id )
        And ( T2.Procedure_RepoObject_guid = T1.referencing_Procedure_RepoObject_guid )
)

    --
    And Not Exists
(
    Select
        Expr1 = 1
    From
        workflow.WorkflowStep_Sortorder As T2
    Where
        ( T2.Workflow_id                   = T1.Workflow_id )
        And ( T2.Procedure_RepoObject_guid = T1.referenced_Procedure_RepoObject_guid )
)