Subject Re: [firebird-support] trigger trouble
Author Martijn Tonies
James,

> I have a trigger which I made, here is the code.
>
> CREATE TRIGGER "counter_AI0" FOR "counter"
> ACTIVE AFTER INSERT POSITION 0
> AS
> begin
> /* if the payment is an advance then add a credit */
> if (new."Mode" = 'ADV') then
> insert into "suppliercredit"(ID, "PaymentID", "Amount", "Status",
> "Type")
> values (gen_id("gen_suppliercredit",1), new.ID, new."Amount", 'ACT',
> 'ADV');

As a complete sidenote: What admin tool are you using??
You're using "..." all over the place, don't you find this very
very annoying? If you uppercase everything, you don't have
to use those nasty quotes.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com