UPDATE AKUZ.T_DISTANCE_MONITORING_PROGRAM AS program
SET MonitoringType = device."Type"
FROM AKUZ.T_DISTANCE_MONITORING_DEVICE AS device
WHERE program.DistanceMonitoringDevice = device.DistanceMonitoringDeviceID
  AND device."type" IS NOT NULL;