-- StatusCode Full Query
-- Source: JDESTAGE.F0005_VIEW
-- Destination: StatusCode
-- Schedule: Mass/Daily/Hourly
-- Note: Uses GIW connection (Config.GIWCS), not JDE connection

SELECT TRIM(sc.USERDEFINEDCODE_DRKY) AS CODE,
       TRIM(sc.DESCRIPTION001_DRDL01) AS Description,
       sc.DATEUPDATED_DRUPMJ AS DateUpdated,
       sc.TIMELASTUPDATED_DRUPMT AS TimeUpdated
  FROM JDESTAGE.F0005_VIEW sc
 WHERE TRIM(sc.PRODUCTCODE_DRSY) = '00' AND
       sc.USERDEFINEDCODES_DRRT = 'SS' AND
       TRIM(sc.USERDEFINEDCODE_DRKY) IS NOT NULL
