Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select SQL questions
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Select SQL questions
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01336043
Message ID:
01336043
Vues:
55
I want to get a list of all sales people who have non-zero amounts:
Select Sales.Person From Sales ;
	WHERE Sales.Item = theItem ;
	AND Sales.amount <> 0.00 ;
	AND Sales.fk_period In (Select periodV.cid From periodV) ;
	GROUP By Sales.Person ;
	Into Cursor doamt
Most of the records in this large table have zero amounts. As this is done many times, I wonder if there is a way to do this more efficiently?

Also, the period range tends to remain the same for most queries. Is it possible to get the values from an array, something like:
AND Sales.fk_period In Array aPeriod ;
(except that doesn't work - is it possible?)

Any suggestions on how to improve this SQL are welcome.

Cyril
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform