468,505 Members | 1,714 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

SQL0206N "O.$COID" is not valid in the context where it is used.

2
When trying to insert this trigger:

CREATE TRIGGER ad_des_part_jon AFTER DELETE ON DESIGJON.PART_LIST REFERENCING OLD AS o FOR EACH ROW mode db2sql
UPDATE DEFINJON.PART_LIST A SET A.WEIGHT=((SELECT WEIGHT FROM DEFINJON.PART_LIST WHERE $COID IN (SELECT $COID FROM DEFINJON.$EXT WHERE $COID_REF = o.$COID)) - o.WEIGHT) WHERE A.$COID IN (SELECT $COID FROM DEFINJON.$EXT WHERE $COID_REF=o.$COID);
DELETE FROM DEFINJON.$EXT WHERE $COID_REF=o.$COID and $CONAME='DESIGJON.PART_LIST' and $TYPE='CATASS';

ERROR MESSAGE:
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0206N "O.$COID" is not valid in the context where it is used.
SQLSTATE=42703

someone has an idea?

thnx

jon
Nov 19 '08 #1
1 3610
7h0r
2
Remark:
If i comment the 'DELETE' line, it works fine...
I'm not that familiar with db2 triggers so maybe it's just something stupid...
thnx

jon
Nov 19 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Prince Kumar | last post: by
4 posts views Thread by jefftyzzer | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.