Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT-SQL command have different results in VFP8 and VF
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01010969
Message ID:
01011020
Vues:
21
>>>
>>>Interestingly, if you create a tag on LEFT(ID,4) in the TABB table, it works.
>>>
>>
>>It also works if you change WHERE NOT EMPTY(taba.field2) to WHERE taba.field2<>" ".
>>
>>Seems like the bug is with EMPTY()
>
>Hi Brad,
>
>Not exactly. The field2 itself is incorrect in result also, Null instead of blank.

That's true about the NULL's... that shouldn't be happening at all. But it's the EMPTY() function in the WHERE clause (or more correctly the NOT EMPTY()) that seems to be driving this not to work.

Doing a WHERE taba.field2<>" " is the same as doing a WHERE NOT EMPTY(taba.field2) yet one returns the correct result and the other doesn't.

I tried the same by changing field2 to a numeric field and date other types of fields and the same phenomenon happens. If you get rid of the NOT EMPTY() in the WHERE clause, everything works as expected.

Weird.

--Brad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform