Can't update table 'dctblloaddata' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
hi
i got this following error when trying to insert
Can't update table 'dctblloaddata' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
my trigger is
DELIMITER $$
CREATE TRIGGER `cfw`.`samplwe` BEFORE INSERT ON `cfw`.`dctblloaddata`
FOR EACH ROW BEGIN
IF (NEW.AvgCurrent>800 OR NEW.AvgCurrent = 0 OR NEW.AvgCurrent =-99999.99 OR NEW.AvgVolt >300 OR NEW.AvgVolt=0 OR NEW.AvgVolt=-99999.99 OR NEW.ActiveDemandFwd=0 OR NEW.ActiveDemandFwd=-99999.99 OR NEW.ApperentDemandFwd=0 OR NEW.ApperentDemandFwd=-99999.99) THEN
INSERT INTO `dctblloaddata` (`MeterID`,`DataID`,`DateVal`,`IntervalID`,`TagType`,`AvgVolt`,`AvgCurrent`,`RDemandExp`,`RDemandFwdExp`,`ActiveDemandFwd`,`RDemandImp`,`RDemandFwdImp`,`ApperentDemandFwd`,`ApperentEnergyImp`,`ActiveEnergyImp`,`ReactiveEnergyImp`,`ReactiveEnergyExp`,`FeederID`,`MTIME`,`CollectionType`,`calculatedtechnicalloss`,`circleid`,`consumerid`,`divisionid`,`substationid`,`zoneid`,`ib`,`ir`,`iy`,`vb`,`vr`,`vy`) VALUES
(NEW. MeterID ,NEW. DataID ,NEW. DateVal ,NEW. IntervalID ,NEW. TagType ,-99999.99,-99999.99,NEW. RDemandExp ,NEW. RDemandFwdExp ,-99999.99,NEW. RDemandImp ,NEW. RDemandFwdImp ,-99999.99 ,NEW. ApperentEnergyImp ,NEW. ActiveEnergyImp ,NEW. ReactiveEnergyImp ,NEW. ReactiveEnergyExp ,NEW. FeederID ,NEW. MTIME ,NEW. CollectionType ,NEW. calculatedtechnicalloss ,NEW. circleid ,NEW. consumerid ,NEW. divisionid ,NEW. substationid ,NEW. zoneid ,NEW. ib ,NEW. ir ,NEW. iy ,NEW. vb ,NEW. vr ,NEW. vy );
END IF;
END$$
DELIMITER ;
give me some suggestion wht i have to do now..