d4135e8ad3
The WHERE clause was comparing Code to itself instead of the aliased table reference, which would always be true.
13 lines
545 B
SQL
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
|