I have the following two tables
activity
activity_bak
I want to take the comments from activity_bak and update the comments in activity to match by using the corresponding activity_no and activity_seq.
I've tried doing it like this but to no success:
update Animal.sysadm.activity
set activity_comment = ab.activity_comment
from Animal.SYSADM.activity a
left join Animal.SYSADM.activity_bak ab
on ab.activity_no = a.activity_no
left join Animal.sysadm.activity_bak ab2
on ab2.activity_seq = a.activity_seq
Any help or pointers would be greatly appreciated.