How to use IF condition in FORALL
660316Sep 24 2008 — edited Sep 25 2008Hi,
I am using FORALL in a stored procedure to inser,update and delete DB records.
Is is possible to use it.
If yes, I want use IF condition in FORALL loop.
This is how I want to do it:
forall i in p_id.first..p_id.last
if condition then
Delete Data
else
Select count(*) int ncount from products where id=p(id);
if(ncount=0) then
Insert new record
else
Update exsisting record
end if;
end if;
Is it possible to achieve
Thanks in Advance