It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.
CREATE OR REPLACE PROCEDURE test AS CURSOR cur_inner IS select * from test_table1 where x = x; CURSOR cur_outer IS select * from test_table2; BEGIN OPEN cur_outer; <<fetch_outer_loop>> LOOP FETCH cur_outer INTO x, y, z; exit fetch_outer_loop when NOT cur_outer%found; OPEN cur_inner; <<fetch_inner_loop>> LOOP FETCH cur_inner INTO x, y, z; /* How do I limit the inner loop to just to values liited by the WHERE clause in the CURSOR cur_inner above? Break the loop and then get the next WHERE clause value from the Outer Loop Cursor. -- process data using values fetched from cur_inne r*/ exit fetch_inner_loop when NOT cur_inner%found; END LOOP fetch_inner_loop; CLOSE cur_inner; insert into result_table (a, b, c ) values (a, b, c ); commit; END LOOP fetch_outer_loop; CLOSE cur_outer_freq; END test;