Re: Examples of SQL anomalies?
Date: Fri, 27 Jun 2008 15:30:34 -0300
Philipp Post wrote:
>>Others have mentioned nulls. One of my pet peeves in this area
> is that in SQL, if I sum zero numbers, the result is null.
> Mathematically, the result is 0. I have an app where I have had make
> adjustments where it is possible that zero numbers are summed. <
> SQL Server at least stripps off NULLs in the SUM function and returns
> a number, but not in a simple addition - then it returns NULL if at
> least one entry is NULL.
>>SUM(A) + SUM(B) != SUM(A+B) <
> The question is, if these issues are due to the SQL specification or
> simply due to a problem in a specific SQL product.
Specification. The problem even happens in Lee Fesperman's FirstSQL which fully supports 4VL. The problem is inherent to NULL and to the haphazard way SQL behaviour was defined right from the start. Received on Fri Jun 27 2008 - 13:30:34 CDT