Subject | RE: [firebird-support] Re: How to do a running total in SQL |
---|---|
Author | Maya Opperman |
Post date | 2015-10-23T12:07:46Z |
Norbert wrote:
>execute blockThank you Norbert, that does look like the simplest solution till FB 3 is available.
>returns (reference varchar(10), due double precision, balance double
>precision)
>as
>begin
>balance = 0;
>for select
>reference,due
>from invoices into :reference, :due
>do begin
>balance = balance+due;
>suspend;
>end
>end