-- Lot Full Query
-- Source: JDESTAGE.F4108_VIEW
-- Destination: Lot
-- Schedule: Mass/Daily/Hourly

SELECT TRIM(lot.LOT_IOLOTN) AS LotNumber,
       TRIM(lot.COSTCENTER_IOMCU) AS BranchCode,
       lot.IDENTIFIERSHORTITEM_IOITM AS ShortItemNumber,
       TRIM(lot.IDENTIFIER2NDITEM_IOLITM) AS ItemNumber,
       lot.PRIMARYLASTVENDORNO_IOVEND AS SupplierCode,
       lot.DATEUPDATED_IOUPMJ AS DateUpdated,
       lot.TIMEOFDAY_IOTDAY AS TimeUpdated
  FROM JDESTAGE.F4108_VIEW lot
 WHERE TRIM(lot.LOT_IOLOTN) IS NOT NULL AND
       TRIM(lot.COSTCENTER_IOMCU) IS NOT NULL
