Can't use NEW keyword in trigger
Ivan Smahin
ivan_smahin at paradigmasoft.com
Tue Aug 27 23:17:49 CDT 2013
On Aug 28, 2013, at 5:02 AM, Brenda Bell <bb31l at theotherbell.com> wrote:
> I have a simple trigger that looks like this:
>
> CREATE TRIGGER "trigger_yarn_compute_weight_grams"
> BEFORE INSERT
> ON "yarn"
> FOR EACH ROW
> WHEN weight_grams = 0
> BEGIN
> NEW.weight_grams = NEW.weight_ounces * 28.3495
> END;
>
> But when I try to save it, I get the following error:
>
> near "NEW": syntax error
>
> What am I doing wrong?
>
Seems to be valid.
Trying it on some test db I get no errors.
Trigger works as expected.
What Valentina version?
Could you send me some small db for testing?
--
Best regards,
Ivan Smahin
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com
More information about the Valentina-studio
mailing list