Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help With Select
Message
De
13/06/2001 18:15:44
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00519030
Message ID:
00519105
Vues:
18
Hi Pat,
Put your WHERE clause with the JOIN's ON condition.
IOW, you want all the SCSAQty stuff, but only the SCASld stuff when it matches and when the period is right. Is that it?

>>Start simple. What does the following do?
>>select scsaqty.saq_sku, sum(scsasld.sal_soldqty) TotSold ;
> from scsaqty ;
> left outer join scsasld ;
> on scsaqty.saq_sku == scsasld.sal_sku ;
> where between(scsasld.sal_solddate, ?dBgnDate, ?dEndDate) ;
> group by scsaqty.saq_sku
>
>This code will only give me sku's that that have been sold in the date range. The scsasld table will have an entry evertime a sku is sold. If a sku was never sold it would't have any entries in the scsasld file.
>
>I need to have every sku from the scsaqty table and the total sold from the scsasld table even if none were sold durring the date range.
>
>Pat
Charlie
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform