update as_assessment_section_map
set section_id = :new_section_id
where assessment_id = :new_assessment_rev_id
and section_id = :section_id
update as_item_section_map
set as_item_id = :new_item_id
where section_id = :new_section_id
and as_item_id = :as_item_id
update as_item_rels
set target_rev_id = :new_mc_id
where item_rev_id = :new_item_id
and target_rev_id = :mc_id
and rel_type = 'as_item_type_rel'
select mc_id, sort_order
from as_item_choices
where choice_id = :choice_id
select choice_id
from as_item_choices
where mc_id = :mc_id
update as_item_choices
set sort_order = sort_order-1
where mc_id = :new_mc_id
and sort_order > :sort_order