Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE distance_m dest,
- (
- SELECT `distance_m`.*
- FROM `distance_m`
- WHERE `distance_m`.`elevator_id` = #{source_id}
- AND ( distance is not NULL and distance > 0)
- ) source
- SET dest.distance = source.distance
- WHERE dest.elevator_id = #{dest_id}
- AND ( dest.distance is NULL or dest.distance <= 0)
- AND dest.city_id = source.city_id")
Add Comment
Please, Sign In to add comment