select item_id from cr_revisions where revision_id = :as_item_id select cr.item_id as item_item_id, cr.title, cr.description, i.subtext, i.field_code, i.required_p, i.data_type, i.max_time_to_complete, i.feedback_right, i.feedback_wrong, i.points from cr_revisions cr, as_items i where cr.revision_id = :as_item_id and i.as_item_id = cr.revision_id select m.as_item_id from as_item_section_map m, cr_revisions r, cr_revisions i where m.section_id = :section_id and m.as_item_id = r.revision_id and i.revision_id = :as_item_id and i.item_id = r.item_id select cr.title, cr.description, i.subtext, i.field_code, i.required_p, i.data_type, i.max_time_to_complete, i.feedback_right, i.feedback_wrong, i.points from cr_revisions cr, as_items i where cr.revision_id = :as_item_id and i.as_item_id = cr.revision_id select i.target_rev_id, o.object_type from as_item_rels i, acs_objects o where i.target_rev_id = o.object_id and i.item_rev_id = :as_item_id insert into as_item_rels (select :new_item_id as item_rev_id, target_rev_id, rel_type from as_item_rels where item_rev_id = :as_item_id)