Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
SQL not yiielding same result as Filter
OK, what am I missing here?
I have two files: BALANCE and PTYPES
PTYPES is ordered on the basis of its TYPE field
BALANCE is related to PTYPES through the TYPE field
Every TYPE in BALANCE should have a match in PTYPES.
I deliberately alter a TYPE in BALANCE to ensure that at least one record does not have a match.
If I SET FILTER TO EMPTY(PTYPES.TYPE) I duly find the erroneous record.
If I SELECT BALANCE.* FROM BALANCE,PTYPES WHERE BALANCE.TYPE=PTYPES.TYPE AND NOT EMPTY(PTYPES.TYPE) INTO DBF ANYTABLE
it duly selects all the correct records and omits the faulty one.
Yet, if I try to do the opposite (in order to detect the faulty one)
i.e.
SELECT BALANCE.* FROM BALANCE,PTYPES WHERE BALANCE.TYPE=PTYPES.TYPE AND EMPTY(PTYPES.TYPE) INTO DBF ANYTABLE
I get zilch.
Pourquoi?
Harry
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement