Subject | Re: [firebird-support] Computing column in BEFORE INSERT trigger |
---|---|
Author | Michael Ludwig |
Post date | 2010-12-21T19:18:28Z |
Alec Swan schrieb am 21.12.2010 um 11:30 (-0700):
CREATE TRIGGER ...
AS BEGIN
NEW.source_id = ... ;
END ^
SET TERM ;^ -- back to normal
--
Michael Ludwig
> Why do I get a syntax error when running the following?SET TERM ^; -- set delimiter
>
> CREATE TRIGGER Source_Id_Upd FOR PHYSICAL_COPY
> BEFORE INSERT OR UPDATE
> AS BEGIN
> NEW.source_id = (select source_id from copy where id = NEW.COPY_ID);
> END;
CREATE TRIGGER ...
AS BEGIN
NEW.source_id = ... ;
END ^
SET TERM ;^ -- back to normal
> I know I could use computed columns, but I need that column to beCan't say. Might make sense the way you do it.
> indexed.
--
Michael Ludwig