Re: Examples of SQL anomalies?

From: Gene Wirchenko <genew_at_ocis.net>
Date: Wed, 02 Jul 2008 11:54:37 -0700
Message-ID: <l6jn64dtgt33kn2dib47rnhjrkuhdhobbp@4ax.com>


Marshall <marshall.spight_at_gmail.com> wrote:

[snip]

>We are discussing the behavior of formal systems, though, not real
>life.

     Actually, I am discussing a real life situation where I got burned by SQL.

     I started the issue of the sum of possibly zero invoices from the point of view of the company invoicing. If I want a report of the total amounts invoiced to various clients during a month, the answer for a given client is unlikely to be zero, because our clients pay a base fee. However, if I ask the similar question restricting to fulfillment work orders, the answer for a given client can easily be zero. Whether it is because:

  1. we do not do fulfillment processing for that client,
  2. we do not do that much fulfillment processing for that client and as it happened none that month,
  3. we do usually do fulfillment processing for that client, but did not charge for some reason,
  4. the month specified has not been invoiced yet, or
  5. any other reason is irrelevant to the original question. The amount invoiced at time of report is zero. That might well prompt the question "Why is it zero?", but that is a different question.

     Attempts by Mr. Celko and other to make a quite simple issue complicated are nonsensical.

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:

     I have preferences.
     You have biases.
     He/She has prejudices.
Received on Wed Jul 02 2008 - 13:54:37 CDT

Original text of this message