oracle8.1.6
select crr.filename as content,
crr.title,
crr.item_id,
cri.storage_type,
crr.revision_id,
crr.content_length,
crr.mime_type
from cr_items cri, cr_revisions crr
where crr.revision_id = :solution_id
and crr.item_id = cri.item_id
select solution_id
from evaluation_tasks_sols
where task_item_id = :task_item_id
and content_revision.is_live(solution_id) = 't'
begin
content_revision.content_copy(:solution_id, :revision_id);
end;
update cr_revisions
set content = empty_blob(),
filename = :filename
where revision_id = :revision_id
returning content into :1
update cr_items
set storage_type = 'lob'
where item_id = :item_id
update cr_revisions
set filename = :url
where revision_id = :revision_id
update cr_revisions
set filename = :file_name,
mime_type = :mime_type,
content_length = :content_length
where revision_id = :revision_id