This script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posted the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.
This script was created to allow a client to easily review the workflow step assignments.
/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk)
This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int).
*/
SELECT
['Workflow Tasks Table'].Workflow_Name
,['Workflow Tasks Table'].WorkflowInstanceID
,['Workflow Tasks Table'].WorkflowTaskAssignedTo
,['Workflow Step Instance Table'].Workflow_Step_Status
,['Workflow Step Instance Table'].Workflow_Step_Assign_To
,['Workflow Instance Master'].Workflow_Status
,['Workflow Instance Master'].Workflow_Originator
FROM
WFI10004 AS ['Workflow Tasks Table'] --Workflow Tasks Table (WFI10004)
INNER JOIN
WFI10003 AS ['Workflow Step Instance Table'] --Workflow Step Instance Table (WFI10003)
ON
['Workflow Tasks Table'].WorkflowInstanceID = ['Workflow Step Instance Table'].WorkflowInstanceID
INNER JOIN
WFI10002 AS ['Workflow Instance Master'] --Workflow Instance Master (WFI10002)
ON
['Workflow Tasks Table'].WorkflowInstanceID = ['Workflow Instance Master'].WorkflowInstanceID