Subject Re: Help with a trigger/procedure
Author Adam
--- In, "Fabio Gomes" <fabioxgn@...>
> Hum, so the main problem would be inserting the same value in the
same table
> at same time?
> Thinking about it, i think i can insert the new value in the table if it
> doesnt exist and then always update it in the trigger event, so i can
> always, insert the new value, commit imediatelly and after that start my
> transaction.
> Would it be better?
> The method about using the table would work too, off course i have a
> with all the individual item values, but i like to keep that just for
> reports and in case of something goes wrong and i have to recalc the
> stock of an item... i think it would be better to avoid that, i m afraid
> this can slow down everything after i have too many rows there.
> Anyway, i m newbie so am open to any suggestions.

From what you have explained, you have a table that has some totals
consolidated in another table, but your explanation is far from clear
which is why no specific suggestions have been made. This totalling
means that two inserts may need to update a single record in the other

Perhaps you can simplify your explanation a little, giving an example
of the tables and what you want your trigger to do.