Re: Examples of SQL anomalies?

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Thu, 26 Jun 2008 19:43:07 -0300
Message-ID: <48641b7e$0$4066$9a566e8b@news.aliant.net>


Gene Wirchenko wrote:

> "Artemus Ward" <artemus.ward_at_no.viagra.thanks> wrote:
>
>

>>Before I waste a big chunk of next week, does anyone know of any docs on the 
>>web that attempt to gather together examples of anomolous behaviour in 
>>standard SQL?  I am thinking particularly of things like inconsistent 
>>treatment of nulls.  I've got a couple of (to me) very obvious examples but 
>>there must be many more.
>>
>>Failing that, can anyone suggest good Google search terms that might return 
>>a manageable number of hits?  Nothing I've tried has been very useful.

>
>
> 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.
>
> Try this one about duplicates:
> http://www.dbdebunk.com/page/page/627052.htm

My personal favorite:

SUM(A) + SUM(B) != SUM(A+B) Received on Thu Jun 26 2008 - 17:43:07 CDT

Original text of this message