Tool to check why queries miss results?

From: Andreas Koch <nospam_at_kochandreas.com>
Date: Sat, 04 Mar 2006 11:05:46 +0100
Message-ID: <dubomn$28u$00$1_at_news.t-online.com>



[Quoted] Hi all,

[Quoted] [Quoted] just a strange idea. Is there some tool that takes [Quoted] an SQL query, plus (parts) of an output of that query you'd expect to see, and then explains why that part of output wasn't created?



Example:

SELECT cty.CityName, cust.Name, bsy.Business FROM City cty, Customer cust, Business bsy WHERE cust.zip=cty.zip and cust.bsyid=bsy.bsyid;

Returns:
New York,Jim, Food
Tokie, Jo, Film

Expected : CityName=London, Name=*, Business=*

whould, with this tables:

Zip, CityName
100, London
200, New York
300, Tokio

Name, Zip, bsyId
John, 100, 42   // yes i know you'll normally have a constraint on that
Jim , 200, 1
Jo , 300, 2

BsyId, Business
1, Food
2, Film

[Quoted] return an analysis like this

CityName London is in Table City
is used by 1 Customer (John)
which is excluded because Customer.bsyId 42 is not in Business.bsyId


Is there any tool that offers automated analysis of such issues, or at least helps manual analysis?

thanks,

   Andreas Received on Sat Mar 04 2006 - 11:05:46 CET

Original text of this message