Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL Question
Hello,
I am pretty new to Oracle and PL/SQL. I need to change some code but do not understand what it is doing. Below is a clip of the code:
.
.
.
.
Cursor c1 is
Select itemnum, clisedate, ponum, vendorid, acctcode, costcenter from purreq;
Cursor c2(p_itemnum purreq.itemnum%type,
p_closedate purreq.closedate%type, p_ponum purreq.ponum%type, p_vendorid purreq.vendorid%type) isselect acctcode, costcenter from tmp_purreq where ponum = p_ponum
BEGIN
open c1;
loop
fetch c1 into var_itemnum, var_closedate, var_ponum, var_vendorid, var_acctcode, var_costcenter;exit when c1%NOTFOUND;
open c2(var_itemnum, var_closedate, var_ponum, var_vendorid);
loop
fetch c2 into v_acctcode, v_costcenter;
exit when c2%NOTFOUND;
.
.
.
.
I do not understand what the parameters are for when the c2 cursor is defined. Also, I do not understand the parameters when the c2 cursor is opened.
Can someone please explain these things to me. I would appreciate it a lot.
Thanks,
Please respond via e-mail.
Arthur
amerar_at_unsu.com
Received on Sat Feb 27 1999 - 18:11:07 CST
![]() |
![]() |