Files
Joseph Doherty 26ff8d9b4f Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/),
new .NET 10 Blazor solution (NEW/), OpenSpec specifications,
documentation, and project configuration.
2026-01-02 07:43:29 -05:00

41 lines
1.1 KiB
Transact-SQL
Executable File

CREATE VIEW [dbo].[WorkOrderStep] AS
SELECT wos.WorkOrderNumber,
wos.WorkCenterCode,
wos.StepNumber,
wos.StepTypeCode,
wos.BranchCode,
wos.StepDescription,
wos.StartDT,
wos.EndDT,
wos.FunctionCode,
fc.Description AS FunctionOperationDescription,
wos.ScrappedQuantity,
wos.LastUpdateDT
FROM
(SELECT hist.WorkOrderNumber,
hist.WorkCenterCode,
hist.StepNumber,
hist.StepTypeCode,
hist.BranchCode,
hist.StepDescription,
hist.StartDT,
hist.EndDT,
hist.FunctionCode,
hist.ScrappedQuantity,
hist.LastUpdateDT
FROM dbo.WorkOrderStep_Hist hist
UNION ALL
SELECT curr.WorkOrderNumber,
curr.WorkCenterCode,
curr.StepNumber,
curr.StepTypeCode,
curr.BranchCode,
curr.StepDescription,
curr.StartDT,
curr.EndDT,
curr.FunctionCode,
curr.ScrappedQuantity,
curr.LastUpdateDT
FROM dbo.WorkOrderStep_Curr curr
) wos LEFT OUTER JOIN
dbo.FunctionCode fc ON (wos.FunctionCode = fc.Code)