/*   this works only for Express

update AutomatedTaskDeviceLink 
   set ScheduleID = (
                       select ScheduleID
                         from AutomatedTask at
                        where at.AutomatedTaskID = AutomatedTaskDeviceLink.ScheduleID
                    )

*/

select ScheduleID
      ,AutomatedTaskID
 from 
       AutomatedTask 