Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trigger Help
Message
From
25/11/2000 01:08:31
 
 
To
24/11/2000 04:58:14
General information
Forum:
Oracle
Category:
Triggers, Sequences and Stored Procedures
Title:
Miscellaneous
Thread ID:
00445141
Message ID:
00445333
Views:
17
Try a semi colon in the last assignment statement.



>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform