--This trigger compiles and works fine
CREATE TRIGGER seq_table_x_trg AFTER INSERT ON TABLE_X REFERENCING NEW ROW
AS new FOR EACH ROW MODE DB2SQL 
UPDATE sequences SET currval = currval + 1 WHERE sequence_name = 'table_x'; 

--If I add this additional clause on the end then it seems to complain about
"new"
SET new.PK = 'abc-' || SELECT currval FROM sequences WHERE sequence_name =
'table_x’;

If anyone can comment would be appreciated.
-- 
View this message in context: 
http://old.nabble.com/triggers---referencing-clause-tp27026717p27026717.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Reply via email to