Pando,

Thanks so much for your response. What I mean by dying was when I do a count on Dave_temp2, it insert records into that table and after certain record it hang and not doing anything. I don't get any ORA- at all.

seem like the resource issues b/c on the following cursor:

select a.grid_key
--, a.grid_lvl3_name
from grid_master a, grid_master b
where a.grid_lvl = 4
--and grid_generatable = 'Y'
and a.grid_priority = 1
and a.grid_lvl3_code <> c_grid_lvl3_code
--and grid_lvl2_code in (c_st_code_twp)
and b.grid_key = c_cnty_grid_key
and sdo_filter(a.sob_geometry, b.sob_geometry, 'querytype = WINDOW') = 'TRUE';
--order by a.grid_lvl3_name;

if I comment out more condition, more records will be inserted and if I take the comment out on the order by less record will be inserted

any thoughts???

Thanks