Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Join with 2 COUNT( ) columns
Message
De
05/04/2001 01:52:03
Adam Skowronski
Custom Designed Systems
Miami, Floride, États-Unis
 
 
À
04/04/2001 19:03:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00492027
Message ID:
00492243
Vues:
14
Thanks to both of you, and I will be experimenting with both solutions tomorrow, but beforehand, I think they are just short of what I need.

Here is the complete data setup and what I am trying to do.

There is the OrderInfo table, containing the (pertinent) fields, [deliverydate, zip-fordelivery, custid]. Then the BillingInfo table, [zip-forbilling, custid].
I am selecting all OrderInfo records based on a deliverydate [ldDate], counting the number of orders for each zip code [oZipCnt], then trying to obtain the number of orders placed from the BillingInfo table... Possibly, I should be trying to join the two tables based on the CustID, but that would only look in one direction - I think.

In a nutshell, I trying to see how many orders were both ordered from [bZipCnt] and sent to [oZipCnt] for any zipcode for the deliverydate [ldDate]. Ultimately, producing 3 columns [bZipCnt, Zip, oZipCnt]. One client could send to many zips, and another zip can receive orders from many clients.

Thanks again, and I hope this explains a little more what I'm trying to do.
Adam J Skowronski
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform