Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inconsistent Query Results
Message
 
 
À
12/04/2005 12:13:40
Jim Winter
Jim Winter Consulting
Hinesburg, Vermont, États-Unis
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
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01003809
Message ID:
01003828
Vues:
21
This message has been marked as a message which has helped to the initial question of the thread.
Try (VFP9 only)
SELECT RoseBran.ItemNo, ;
		RoseBran.Descrip, ;
		RoseBran.Descrip1, ;
		SUM(ARST.Shipped) as Shipped ;
	FROM RoseBran ;
	LEFT OUTER JOIN (
		SELECT SUM(Shipped) AS Shipped, ItemNo FROM ARSTrans
		WHERE BETWEEN(DateShip, DATE(2005,01,01), DATE());
                GROUP BY 2) ARST ;
	ON RoseBran.ItemNo = ARST.ItemNo ;
	GROUP BY 1, 2, 3 ;
	ORDER BY 1 ;
	INTO CURSOR TEMP
>>Try to change WHERE clause to
WHERE BETWEEN(ARSTrans.DateShip,CTOD('2005/01/01'),DATE()) OR ARSTrans.DateShip IS NULL) ;
>>
>>
>>>Tried the following query in VFP9, VFP8, and VFP7. Records returned were 226, 236, and 232 respectively. I was expecting 263 because that is the number of records in the table on the left, RoseBran. Can anyone see what I'm missing here?
>
>
>Sergey,
>
>I think that's the solution, although the results were only 262. Not sure about the missing record - but its a heck of a lot closer.
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform