Subject Trigger - Column Unknown
Author gorepj
Hi,
I'm trying to create a trigger but I keep getting Column Unknown
error.

SET TERM ^ ;
CREATE TRIGGER UPDATE_BALANCE_POSTINSERT FOR CURRENTACCOUNT
AFTER INSERT AS
BEGIN
if (BALANCE.SUMOFNET_CHANGE IS NULL) THEN
INSERT INTO BALANCE (SUMOFNET_CHANGE) VALUES (new.debit -
new.credit);
ELSE
UPDATE BALANCE SET SUMOFNET_CHANGE = SUMOFNET_CHANGE +
new.debit - new.credit;
END ^
SET TERM ; ^


The Error is associated with BALANCE.SUMOFNET_CHANGE where BALANCE
is another Table in the same database.

What have I done wrong?
Peter Gore