Re: Tool to check why queries miss results?

From: Andreas Koch <nospam_at_kochandreas.com>
Date: Mon, 06 Mar 2006 21:48:29 +0100
Message-ID: <dui73l$jbi$00$1_at_news.t-online.com>


[Quoted] DA Morgan wrote:

>> A) This is the Query i executed

> Good so far.
>
[Quoted] [Quoted] >> B) This is what results i got (the tool can get that
>> itself of course)

> Good so far.
>
>> C) This is a value i would have expected to get, but
>> didn't.

>
> How can you possibly know what you should have expected. I
> know you think this is possible but it isn't. Here's an
> example. I have a table that looks like this:
>
> SEATTLE January
> LONDON June
> LONDON June
> SEATTLE February
> LONDON July
>
> Here is my first query:
>
> SELECT city_name
> FROM mytable
> WHERE month like 'J%';
>
> Here is my second query:
>
> SELECT city_name
> FROM mytable
> WHERE month like 'Ju%'
>
> Do I have a right to complain that the tool should have known
> I really wanted January? No. If I wrote the second query I am
> am unqualified and need to be trained or replaced.

[Quoted] You have the right to call the support or the poor guy who has to maintain the application.
Then the guy types



[Quoted] SELECT city_name FROM mytable WHERE month like 'Ju%' and
myEntry.Month="January"
in his magic tool.

The tool checks:
Ok, table mytable contains
January
June
June
February
July
Knowledge Spot 1 : Select month from mytable would return January Checking "where"...
Row #1 of mytable woudl return January unfiltered Row #1, Month = January Filter: "January" like "Ju%"

Explanation:
You don't get myEntry.Month="January", because the 1 Row of mytable which contains "January" doesn't meet where-clause "January" like "Ju%"


To prevent misunderstandings - this is not about some database operator who sits in front of his Mainframe and wonders for hours "damn, why does like "Ju%" not return january".

This is about allready done real-life largish applications where some bugs obviously slipped the tests and have to be found years later.
This may be avoidable in university theory, but no one could yet show me an error free non-trivial application in real life.

> The tool you want does not exist and the technology to create the
> tool you want will not exist in my lifetime. And I am planning to
> live a very long time.

Will you buy a copy when i wrote it? ;-) Received on Mon Mar 06 2006 - 21:48:29 CET

Original text of this message