select live_revision from cr_items where item_id = :ims_item_id select mime_type from cr_revisions where revision_id = :revision_id select content_type from cr_items where item_id = :item_id select table_name from acs_object_types where object_type = :content_type , content as text select x.*, :content_type as content_type $text_sql from cr_revisions r, ${table_name}x x where r.revision_id = :revision_id and x.revision_id = r.revision_id select live_revision from cr_items where item_id = :ims_item_id select folder_id from cr_folders where label = 'LORSM Root Folder'