Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Too Many Cursors?
So i think what you are saying here is join b_table with a_table , but
only join if there are no rows with a b_table.val4 greater than the
current row. I am guessing you are attempting to find the newest
version of a row or something. Would something like this work better:-
select a.val1, b.val2, b.val3 from a_table a, (select a_key, max(val4) from b_table group by a_key) new_b_table
The reason you are getting too many open cursors, is because you have opened a cursor for every row of the query results - there is a setting in the init.ora that limits the number of open cursors.
You will have work out a better way of writing the SQL for this problem, as opening a new cursor for each row is not going to work.
Try and post what you are trying to achive here, and someone will help you out. Received on Tue Oct 04 2005 - 11:46:46 CDT