MySQL Forums
Forum List  »  InnoDB

getting thre following error when i am trying to execuet cursor within the trigger
Posted by: om Joshi
Date: July 10, 2008 07:44AM

my trigger is.....


DELIMITER |
CREATE TRIGGER Projectphasesdefects_InsertPhases_After AFTER INSERT ON projectphasesdefects
FOR EACH ROW
BEGIN

declare projectidvaluenew varchar(50);
declare plannedeffort float;

declare idCur1, indexCur1 int default 0;
set projectidvaluenew=new.projectid;
DECLARE cur1 CURSOR FOR SELECT nodeID FROM nodetrees where ProjectID = projectidvaluenew;
OPEN cur1;
set idCur1 = (Select FOUND_ROWS());

while indexCur1<idCur1 do
FETCH nodeId into projletidvalue;
select PhasePlannedEffort into plannedeffort
from project.projletphases where projletid= projletidvalue;

UPDATE project.projletphases
SET ProjletLCL = new.defectlcl* plannedeffort,
ProjletGoal= new.defectgoal* plannedeffort ,
ProjletUCL = new .defectucl * plannedeffort
WHERE projletID = projletidvalue;

set indexCur1=indexCur1+1;

end while;


CLOSE cur1;


END
|

Options: ReplyQuote


Subject
Views
Written By
Posted
getting thre following error when i am trying to execuet cursor within the trigger
3729
July 10, 2008 07:44AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.