Re: Examples of SQL anomalies?

From: -CELKO- <jcelko212_at_earthlink.net>
Date: Mon, 30 Jun 2008 08:52:03 -0700 (PDT)
Message-ID: <df83e03c-ee10-4b05-aa1b-74689a32fc99@m73g2000hsh.googlegroups.com>


>> If I want the total amount invoiced in a time period and there are no invoices, the total amount invoiced was zero. <<

You have to coalesce the NULL to a zero or drop it as not in the set. Remember this one from freshman logic when the book got to the Greek paradoxes?

  1. A cat has one more tail than no cat.
  2. No cat has 12 tails. Ergo; a cat has 13 tails.

This is based on confusing the **quantity** zero with the absence of an entity to have a quantity. Get a copy of "Zero: The Biography of a Dangerous Idea" by Charles Seife or "The Nothing that Is: A Natural History of Zero" by Robert Kaplan and Ellen Kaplan. There is also a kid's book, A Place for Zero: A Math Adventure" by Angeline Sparagna Lopresti and Phyllis Hornung, but it does not get into set theory. Received on Mon Jun 30 2008 - 10:52:03 CDT

Original text of this message