SELECT TRIM(woz.SZEDUS) AS UserID,
       TRIM(woz.SZEDBT) AS BatchNumber,
       TRIM(woz.SZEDTN) AS TransactionNumber,
       woz.SZEDLN AS LineNumber,
       woz.SZOPSQ / 10.0 AS StepNumber,
       TRIM(woz.SZMCU) AS WorkCenterCode,
       woz.SZDOCO AS WorkOrderNumber,
       TRIM(woz.SZTRT) AS RoutingType,
       TRIM(woz.SZMMCU) AS BranchCode,
       TRIM(woz.SZDSC1) AS StepDescription,
       TRIM(woz.SZURRF) AS FunctionCode,
       woz.SZTRDJ AS TransactionDate_Date,
       woz.SZUPMJ AS LastUpdateDate,
	   woz.SZTDAY AS LastUpdateTime
  FROM PRODDTA.F3112Z1 woz
 WHERE woz.SZTYTN = 'JDERTG' AND
       woz.SZDRIN = '2' AND
       woz.SZTNAC = '02' AND
       woz.SZPID = 'ER31410' AND 
	   TRIM(woz.SZEDUS) IS NOT NULL AND 
	   TRIM(woz.SZEDBT) IS NOT NULL AND 
	   TRIM(woz.SZEDTN) IS NOT NULL AND 
	   TRIM(woz.SZMCU) IS NOT NULL