09.02.2016 13:16, Svein Erling Tysvær setys...@gmail.com [firebird-support] 
wrote:
> Then you should have a separate process that at set times (e.g. once every 
> hour, day or
> week), does something like:
>
> for select DistinctField, sum(MySummationField) from twarehouse_sum group by 1
>      into :DistinctField, :MySum do

   I would add here "having count(*) > 1" to avoid unnecessary work.

> begin
>    delete from twarehouse_sum where DistinctField = :DistinctField;
>    insert into twarehouse_sum(DistinctField, SummationField)
>    values(:DistinctField, :MySum);
> end


-- 
   WBR, SD.
  • [firebird-suppo... 'checkmail' check_m...@satron.de [firebird-support]
    • AW: [fireb... 'checkmail' check_m...@satron.de [firebird-support]
      • Re: [f... Svein Erling Tysvær setys...@gmail.com [firebird-support]
        • Re... Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
        • AW... 'checkmail' check_m...@satron.de [firebird-support]

Reply via email to