Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL error
Message
 
À
21/04/2015 16:11:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01618877
Message ID:
01618941
Vues:
59
>But they are not. It seems I had it backwards. It works as long as there is an ORDER BY. With no ORDER BY, the numbers are wild.
>
>I ran the query with no grouping to see if I could tell what was happening. What is happening is that without the ORDER BY, this phrase:
>
>
>				WHERE b.control_no in ;
>					(SELECT towfky FROM redeem WHERE redeem.dredeemdat>= {01/01/2014} AND redeem.dredeemdat<= {12/31/2014}) ;
>
>
>
>is responding true and including records where redeem.dredeemdat is empty!

Of course it will include these records.
You check IF b.control_no in some values between some dates, BUT what happens
if some b.control_no IS in that list but have empty date?
It will be included in the result.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform