Re: Examples of SQL anomalies?
Date: Mon, 30 Jun 2008 08:52:03 -0700 (PDT)
>> 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?
- A cat has one more tail than no cat.
- 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