Files
jdescopingtool/DATA_SYNC/JDE/SQL_GET_WORKORDER_TIMES.sql
Joseph Doherty d4135e8ad3 fix(data-access): correct self-referential SQL in WorkCenter filter
The WHERE clause was comparing Code to itself instead of the aliased
table reference, which would always be true.
2026-01-06 14:12:07 -05:00

15 lines
574 B
SQL

-- WorkOrderTime Full Query
-- Source: JDESTAGE.F31122_VIEW
-- Destination: WorkOrderTime_Curr
-- Schedule: Mass/Daily/Hourly
SELECT wot.UNIQUEKEYIDINTERNAL_WTUKID AS UniqueID,
TRIM(wot.COSTCENTERALT_WTMMCU) AS BranchCode,
wot.DOCUMENTORDERINVOICEE_WTDOCO AS WorkOrderNumber,
wot.SEQUENCENOOPERATIONS_WTOPSQ AS StepNumber,
wot.ADDRESSNUMBER_WTAN8 AS AddressNumber,
wot.DTFORGLANDVOUCH1_WTDGL AS GlDate,
wot.DATEUPDATED_WTUPMJ AS DateUpdated,
wot.TIMEOFDAY_WTTDAY AS TimeUpdated
FROM JDESTAGE.F31122_VIEW wot