Subject Re: [firebird-support] This trigger
Author Ann W. Harrison
ShepherdHill DB Subscriptions wrote:
>
> What am I doing wrong here?
>
> ----
> SET TERM ^ ;
> CREATE TRIGGER HALL_ALL_NAMA ACTIVE

CREATE TRIGGER HALL_ALL_NAMA FOR HALL_ALLOCATION ACTIVE

> BEFORE INSERT POSITION 0
> AS
> BEGIN
> NEW.nama = (SELECT nama FROM pool WHERE matric = NEW.matric);

SELECT p.nama
FROM pool p
WHERE p.matric = NEW.matric
INTO NEW.nama
> END^
> SET TERM ; ^
> ----

When you have overlapping field names in different tables,
using table aliases avoids many mistakes that are easy to
make and hard to find.


Regards,


Ann