update oa_budget_making a
left join oa_budget_template_detail b on b.template_id = a.template_id and b.budget_type = a.budget_type and b.budget_child_type = a.budget_child_type
set a.upper_limit = b.upper_limit,a.upper_limit_value = a.upper_limit_value
where ifnull(a.template_id,'') != '';