Time Category Delete Script

Script to delete time category

/
declare
cursor c1 is
select *
 from hxc_time_category_comps
 where value_id in (select to_char(project_id)
                      from pa_projects_all
                     where segment1 in ('xxx','xxx'));
begin
for i in c1 loop
hxc_time_category_comp_api.delete_time_category_comp
                                (  p_time_category_comp_id   => i.time_category_comp_id
                                     ,p_object_version_number   => 1
                                   );
end loop;                                 
Commit;
end;
/