oracle8.1.6
select content_folder.get_label(:folder_id) as title from dual
select padded_name, folder_id from (select
ci.item_id,
lpad (' ',((level - 1) * 18),' ') || content_folder.get_label(ci.item_id) as padded_name,
ci.item_id as folder_id
from cr_items ci
where ci.content_type = 'content_folder'
start with ci.item_id = :root_folder_id
connect by prior ci.item_id = ci.parent_id
and ci.item_id != :folder_id
)
where acs_permission.permission_p(item_id, :user_id, 'pa_create_folder') = 't'
begin
content_folder.move (
folder_id => :folder_id,
target_folder_id => :new_folder_id
);
end;