update site_nodes
set object_id = :object_id
where node_id = :node_id
update acs_objects
set package_id = :object_id
where object_id = :node_id
update acs_objects
set context_id = :context_id
where object_id = :object_id
update site_nodes
set name = :name
where node_id = :node_id
update acs_objects
set title = :name
where object_id = :node_id
update site_nodes
set object_id = null
where node_id = :node_id
update acs_objects
set package_id = null
where object_id = :node_id
select node_id
from site_nodes
where parent_id is null