Hi All,
I am trying to a get a trigger retrieved from Oracle to work on DB2
UDB 8.1. I am getting the following error when trying to create the
trigger. How would I resolve this?
create table dept (
dept# int not null primary key,
deptname varchar(30))
@
create table rep (
rep# int not null primary key,
dept# int ,
repname varchar(30))
@
create trigger brd_dept no cascade
before delete on dept
for each row
mode db2sql
begin atomic
--similar to cascade set null
update rep set dept# = null where dept# = old.dept#;
end
@
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 "OLD.DEPT#" is not valid in the context where it is used.
LINE
NUMBER=7. SQLSTATE=42703
thanks,