all i'm doing is creating a procedure, that will pass another parameter to a
bigger procedure. it seems that it finds the value of v_org_id only once,
and it inserts all the 864 rows that it should. but after, it does this,
the transaction keeps running - with no additional rows being added. thanks
for any help.
CREATE procedure nmetric.nmsched_pop_org_avail_all
declare v_org_id varchar(20)
declare getorgid cursor for
select DISTINCT org_id
fetch next from getorgid into v_org_id
while (fetch_status != -1)
if (fetch_status != -2)
execute nmsched_pop_org_avail v_org_id
fetch next from getorgid into ...