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
+13
View File
@@ -0,0 +1,13 @@
-- OrgHierarchy Full Query
-- Source: JDESTAGE.F30006_VIEW
-- Destination: OrgHierarchy
-- Schedule: Mass/Daily/Hourly
SELECT TRIM(oh.DISPATCHGROUP_IWMCUW) AS ProfitCenterCode,
TRIM(oh.COSTCENTER_IWMCU) AS WorkCenterCode,
TRIM(oh.COSTCENTERALT_IWMMCU) AS BranchCode,
oh.DATEUPDATED_IWUPMJ AS DateUpdated,
oh.TIMEOFDAY_IWTDAY AS TimeUpdated
FROM JDESTAGE.F30006_VIEW oh
WHERE TRIM(oh.COSTCENTER_IWMCU) IS NOT NULL AND
TRIM(oh.COSTCENTERALT_IWMMCU) IS NOT NULL