Subject Re: [IBO] Re: Error in calculations SQL
Author Helen Borrie
At 09:23 PM 15/01/2007, you wrote:
>I have seen that if you put the sentence between parenthesis this is
>executed well, but this did not happen to me with version 4.6, thus
>the sentence:
>
>SELECT (sum(coalesce(Precio, 0) * coalesce(Cantidad, 1) *
>(100-coalesce(Descuento, 0))/100)*1.16) as TotalAlbaran
>FROM LinAlbaranes LIN
>WHERE AnoAlbaran=2007 and SerieAlbaran=0 and idAlbaran=36
>
>
>is executed correctly

You might also consider removing the table alias (LIN) from your
statement. It is syntactically incorrect for Firebird 2 as it is and
is a source of possible confusion for the IBO parser.

Helen