insert into category_temp values (:tree_id) delete from category_temp and (upper(n.object_name) < 'A' or upper(n.object_name) > 'Z') and upper(n.object_name) like :bind_letter and n.package_id = :package_id select v.object_id from (select distinct m.object_id, c.category_id from category_object_map m, categories c, categories c_sub, category_temp t where c.category_id = t.category_id and m.category_id = c_sub.category_id and c_sub.tree_id = c.tree_id and c_sub.left_ind >= c.left_ind and c_sub.left_ind < c.right_ind) v group by v.object_id having count(*) = :category_ids_length select m.object_id from category_object_map m, category_temp t where m.category_id = t.category_id group by m.object_id having count(*) = :category_ids_length select distinct m.object_id from category_object_map m, categories c, categories c_sub, category_temp t where c.category_id = t.category_id and m.category_id = c_sub.category_id and c_sub.tree_id = c.tree_id and c_sub.left_ind >= c.left_ind and c_sub.left_ind < c.right_ind select distinct m.object_id from category_object_map m, category_temp t where m.category_id = t.category_id insert into category_temp values (:category_id)