Skip to Content

My trigger does not work ?

Hi,

I log in sybase iq using default user dba. Then I create a trigger:

create or replace trigger test

before update of level on grade

referencing new as new_gr

for each row

begin

set new_gr.level = new_gr.level + 1;

end;

And here is the structure of the grade table:

create table grade(

level int,

grade_mark numeric(8, 3)

);

Then I issue the following statements:

insert into grade(level, grade_mark) values(1, 5.0);

select * from grade;

update grade set level=2 where grade_mark=5.0;

select * from grade;

I find that the trigger does not fire after update statement.

I expect the level should be 3, but it is still 2 for grade_mark 5.0

Please help me.

Thanks

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Sep 05, 2014 at 09:53 AM

    SaP IQ doses not support triggers in IQ tables. They are only supported on catalog tables.

    Add comment
    10|10000 characters needed characters exceeded