Why FORALL Loop is not Working in PL/SQL......
581299Jun 12 2007 — edited Jun 13 2007hi Guys,
I have created a procedure with Object as Argument.......
CREATE OR Replace PROCEDURE Object_Student1(p student_detail1)
AS
BEGIN
FORi in p.first .. p.last loop
INSERT INTO Sample_mix VALUES (p(i));
end loop;
COMMIT;
END Object_Student1;
/
This above was not working..........After I have changed the PL/SQL in the INSERT statement....
CREATE OR Replace PROCEDURE Object_Student1(p student_detail1)
AS
BEGIN
FOR i in p.first .. p.last loop
INSERT INTO Sample_mix VALUES (p(i).roll,P(i).SALARY,P(i).ADDRESS,P(i).Name,P(i).mobile);
end Loop;
COMMIT;
END Object_Student1;
/
now This is Running Successfully.... But After I changed From FOR Loop TO FORALL loop..
CREATE OR Replace PROCEDURE Object_Student1(p student_detail1)
AS
BEGIN
FORALL i in p.first .. p.last
INSERT INTO Sample_mix VALUES (p(i).roll,P(i).SALARY,P(i).ADDRESS,P(i).Name,P(i).mobile);
COMMIT;
END Object_Student1;
/
The Above Code is Not working..... giving the folloing ERRORS...
LINE/COL ERROR
-------- -----------------------------------------------------------------
5/32 PLS-00436: implementation restriction: cannot reference fields of
BULK In-BIND table of records
5/42 PLS-00436: implementation restriction: cannot reference fields of
BULK In-BIND table of records
5/54 PLS-00436: implementation restriction: cannot reference fields of
BULK In-BIND table of records
5/67 PLS-00436: implementation restriction: cannot reference fields of
BULK In-BIND table of records
LINE/COL ERROR
-------- -----------------------------------------------------------------
Could anybody tell me why here ForALL loop is not Working....??
thanx
sanjay