1、同一个表中bar_code相同时,把seq_no长度大于16的collection/gatherer/gatherer_code/collect_time/update_by的值赋给seq_no长度等于16的列。完成根据自表的数据更新另外一部分数据。
UPDATE inspection_exec_info a,
inspection_exec_info b
SET a.collection = b.collection,
a.gatherer = b.gatherer,
a.gatherer_code = b.gatherer_code,
a.collect_time = b.collect_time,
a.update_by = b.update_by
WHERE
a.bar_code = b.bar_code
AND LENGTH( a.seq_no ) = 16
AND LENGTH( b.seq_no ) > 16