select node_id from site_nodes sn, cr_folders f where f.folder_id = :item_id and sn.object_id = f.package_id update cr_items set parent_id = -400 where item_id = :item_id