Subject | Re: Help with procedure |
---|---|
Author | cpienta |
Post date | 2003-04-24T13:32:28Z |
I will go and make some changes. Thank you all for the great info.
Much appreciated.
Much appreciated.
--- In ib-support@yahoogroups.com, Helen Borrie <helebor@t...> wrote:
> At 10:09 PM 24/04/2003 +1000, I wrote:
>
>
> >Daniel, yes it would, if the columns being SUMmed were themselves
> >nullable. They are defined as
> >TOTAL_PRICE T_MONEY_TYPE not null,
> >TOTAL_COST T_MONEY_TYPE not null,
> >
> >so, summing them can't return null.
> >
> >h.
>
>
> ..which just gave me another idea why the calculations sometimes
produce
> wrong results...
>
> The SP code is not re-intialising the variables with each pass of
the
> loop. So, if the loop passes through an invoice which has NO
detail lines,
> that invoice will get results that were calculated using the values
of the
> variables as they were when the loop previously DID return values,
for a
> different invoice header.
>
> heLen