Consultor Eletrônico



Kbase P58800: Cannot find any appropriate WHERE clause for my query
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   12/11/2003
Status: Unverified

SYMPTOM(s):

Cannot find any appropriate WHERE clause for my query

CAUSE:

The database table design is not appropriate for your business needs

FIX:

Change your Database design in order to have a possible WHERE clause that makes possible the logical implementation of the query you need. Sometimes in order to improve performance you may also consider to introduce some redundancy in the tables.
A classic sample is when user have the need to count the number of record of a sub-table.
Talking in Sports terminology, if you often need to have the information of the number of order that a certain customer has, you may consider to store this information in the customer table as well (even though in a way this information is already contained in the order table).
Off course this requires some thinking in order to write the code that maintains this field up to date.