Subject Re: [firebird-support] Help with a trigger/procedure
Author Fabio Gomes
So what do you advice me to do?

I already have another software( in php) that use this method, and i never
had problems, i simply wrote a function if the current quantity isnt correct
that function will sum the history and correct things up, thats why i m
thinking about using the same method in this too.

On 7/28/06, Dimitry Sibiryakov <SD@...> wrote:
> On 27 Jul 2006 at 17:22, Fabio Gomes wrote:
> >I ll try to explain what i need.. i have 2 tables, one that have the
> >general stock history, and other with the current stock of each item
> >(i used the serial number as primary key).
> What you are talking about is usually called "stored aggregates"
> and is not recommended to be used without absolute necessity.
> Keeping current quantity by triggers may be troublesome in
> multiuser environment. More often the quantity is kept for some date
> in the past and current quantity is computed as that quantity + sum
> of operations since then.
> --
> SY, Dimitry Sibiryakov.

[Non-text portions of this message have been removed]