Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Help with Trigger PLS-00049

Help with Trigger PLS-00049

From: <tjmxyz_at_my-deja.com>
Date: Fri, 24 Nov 2000 09:51:21 GMT
Message-ID: <8vldmp$o2b$1@nnrp1.deja.com>

Hi!

I'm a little lost on this trigger...
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 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'

I looked in the manual but did not see any examples of using variables in a trigger ....

What could be wrong?

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Nov 24 2000 - 03:51:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US