bulk collect [message #631887] |
Wed, 21 January 2015 08:19 |
|
palpali
Messages: 138 Registered: December 2014 Location: India
|
Senior Member |
|
|
Hallo all
I am just trying to execute following code but i am getting error
"ORA-06550"
c
can anyone please help me?
thanking you in advance.
rg,
Declare
TYPE Emplist IS VARRAY(100) of Number;
Empids Emplist := Emplist(7369,7521,7566,7654,7698);
Type Bonlist is Table of emp.sal%type;
Bonlist_inst Bonlist;
Begin
Bonlist_inst := Bonlist(1,2,3,4,5);
FORALL i in empids.FIRST..empids.LAST
update emp
set comm = 0.1 * sal
where empno = empids(i)
returning sal BULK COLLECT INTO Bonlist;
FOR i IN Empids.FIRST..Empids.LAST LOOP
UPDATE Emp_tab Set comm = 0.1 * sal
WHERE Empno = Empids(i)
RETURNING Sal INTO BONLIST(i);
END LOOP;
End;
/
|
|
|
|
|
|
|
|
|
|
|
|
|