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
+16
View File
@@ -0,0 +1,16 @@
-- LotUsage Full Query
-- Source: JDESTAGE.F4111_VIEW
-- Destination: LotUsage_Curr
-- Schedule: Mass/Daily/Hourly
SELECT lu.UNIQUEKEYIDINTERNAL_ILUKID AS UniqueID,
lu.DOCUMENTORDERINVOICEE_ILDOCO AS WorkOrderNumber,
TRIM(lu.LOT_ILLOTN) AS LotNumber,
TRIM(lu.COSTCENTER_ILMCU) AS BranchCode,
lu.IDENTIFIERSHORTITEM_ILITM AS ShortItemNumber,
lu.QUANTITYTRANSACTION_ILTRQT AS Quantity,
lu.DATETRANSACTIONJULIAN_ILTRDJ AS DateUpdated,
lu.TIMEOFDAY_ILTDAY AS TimeUpdated
FROM JDESTAGE.F4111_VIEW lu
WHERE lu.DOCUMENTTYPE_ILDCT = 'IM' AND
TRIM(lu.LOT_ILLOTN) IS NOT NULL