Subject | Re: [firebird-support] Computing column in BEFORE INSERT trigger |
---|---|
Author | Alec Swan |
Post date | 2010-12-21T20:50:13Z |
Michael, setting delimiter did not fix the problem.
Thanks,
Alec
Thanks,
Alec
On Tue, Dec 21, 2010 at 12:18 PM, Michael Ludwig <milu71@...> wrote:
>
>
> Alec Swan schrieb am 21.12.2010 um 11:30 (-0700):
>
> > Why do I get a syntax error when running the following?
> >
> > 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;
>
> SET TERM ^; -- set delimiter
> 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 be
> > indexed.
>
> Can't say. Might make sense the way you do it.
>
> --
> Michael Ludwig
>
>
[Non-text portions of this message have been removed]