Files
jdescopingtool/DATA_SYNC/JDE/SQL_GET_BUSINESS_UNITS.sql
T
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

13 lines
545 B
SQL

-- Business Units Full Query (Branch, ProfitCenter, WorkCenter)
-- Source: JDESTAGE.F0006_VIEW
-- Destination: Branch (typeCode='BP'), ProfitCenter (typeCode='I3'), WorkCenter (typeCode='WC')
-- Schedule: Mass/Daily/Hourly
-- Parameter: :typeCode ('BP', 'I3', or 'WC')
SELECT TRIM(wc.COSTCENTER_MCMCU) AS Code,
TRIM(wc.DESCRIPTION001_MCDL01) AS Description,
wc.DATEUPDATED_MCUPMJ AS DateUpdated,
wc.TIMELASTUPDATED_MCUPMT AS TimeUpdated
FROM JDESTAGE.F0006_VIEW wc
WHERE wc.COSTCENTERTYPE_MCSTYL = :typeCode