A method and system for diagnosing data problems in a database. The system provides
a test program for running simultaneously a series of tests on the database. In
the test program, a set of queries corresponding to the series of tests are defined.
Then these queries are refined as fields of a larger query, such that the test
results appear merely as small tables. This technique can be implemented using
SQL commands "WITH" and "LEFT OUTER JOIN." The test program is configured to display
automatically all the results from the tests in one table. By simply running the
test program and viewing the table showing all the test results, an operator is
able to diagnose easily the nature and location of the data problem(s) in the database.