oracle8.1.6 select 't' from cr_revisions r, cr_items i where r.revision_id = :revision_id and i.item_id = r.item_id and ((r.content is not null and i.storage_type in ('lob','text')) or (r.filename is not null and i.storage_type = 'file')) select content_item.get_template(:item_id, :context) as template_id from dual select content_item.get_path(:item_id) from dual select content_item.get_best_revision(:item_id) from dual