Subject How to use a Domain in a Stored Procedure or Trigger?
Author h630540
Hello,

how do I use a Domain in a Stored Procedure or Trigger?

Example:

CREATE DOMAIN TID AS INTEGER NOT NULL;

CREATE MY_TABLE (
ID TID, -- this works fine!
...
);

CREATE TRIGGER "TRIG_MY_TABLE_AI" FOR "MY_TABLE" AFTER INSERT AS
DECLARE VARIABLE pID TID; -- this doesn' work!
BASED ON MY_TABLE.ID pID; -- this doesn' work!
BASED_ON MY_TABLE.ID pID; -- this doesn' work!
...

In larger projects it will be very useful.

Thank you
Stefan