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.
This commit is contained in:
Joseph Doherty
2026-01-06 14:12:07 -05:00
parent 34daf6a83b
commit d4135e8ad3
67 changed files with 8520 additions and 12 deletions
+17
View File
@@ -0,0 +1,17 @@
-- RouteMaster Full Query
-- Source: JDESTAGE.F3003_VIEW
-- Destination: RouteMaster
-- Schedule: Mass/Daily/Hourly
SELECT TRIM(route_master.COSTCENTERALT_IRMMCU) AS BranchCode,
TRIM(route_master.ITEMNUMBER2NDKIT_IRKITL) AS ItemNumber,
TRIM(route_master.TYPEROUTING_IRTRT) AS RoutingType,
route_master.SEQUENCENOOPERATIONS_IROPSQ AS SequenceNumber,
TRIM(route_master.USERRESERVEDREFERENCE_IRURRF) AS FunctionCode,
TRIM(route_master.COSTCENTER_IRMCU) AS WorkCenterCode,
route_master.EFFECTIVEFROMDATE_IREFFF AS StartDate,
route_master.EFFECTIVETHRUDATE_IREFFT AS EndDate,
route_master.DATEUPDATED_IRUPMJ AS DateUpdated,
route_master.TIMEOFDAY_IRTDAY AS TimeUpdated
FROM JDESTAGE.F3003_VIEW route_master
WHERE TRIM(route_master.ITEMNUMBER2NDKIT_IRKITL) IS NOT NULL