UPDATE tb_track_scale_record SET trainWeight = ( CASE WHEN grossWeight IS NOT NULL THEN tareWeight WHEN tareWeight IS NOT NULL THEN tareWeight END );
UPDATE tb_track_scale_record SET trainWeight = ( CASE WHEN grossWeight IS NOT NULL THEN tareWeight WHEN tareWeight IS NOT NULL THEN tareWeight END );