General information
Category:
Triggers, Sequences and Stored Procedures
CREATE OR REPLACE TRIGGER packing_fdb_colcount_tomain
BEFORE INSERT OR UPDATE ON "PACKING"
FOR EACH ROW
DECLARE
ColorCnt number;
BEGIN
IF (INSERTING OR UPDATING) AND :new.COLOUR<>:old.COLOUR THEN
ColorCnt := 0;
FOR cnt IN 1..8 LOOP
IF SUBSTR(:new.COLOUR,cnt*20-19,20) IS NOT NULL THEN
ColorCnt := ColorCnt+1;
END IF;
END LOOP;
update styles set moc001=:ColorCnt where mainkey=:new.mainkey;
END IF;
END;
/
11/27 PLS-00049: bad bind variable 'COLORCNT'
What's wrong? I looked in the manual but can't find any use of
variables anywhere in triggers.. And why doesn't line 8 bomb out if line
11 does...
Cheers.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only