Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Query Question
Message
De
15/12/1999 09:50:26
 
 
À
15/12/1999 08:16:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00303967
Message ID:
00304020
Vues:
28
>I have three tables customer, sales, arcsales
>
>I'm trying to get this result
>
>Show all records in the customer table
>+ the corresponding sales volume field if a record exist in sales or arcsales, all in one SQL statement.
>
>
>Thanks in advance

Same way as you would if you are running the query directly to whatever your database is. If the question is if you have the three tables in ADO recordsets and want to run it from them it can't be done AFAIK. What you would do is run it on the backend and put that in an ADO RS. That's what the RDBMS is there for isn't it? ANSI-SQL would be something like:
Select customer.*, Sum(sales.dollars), Sum(arcsales.dollars)
   From Customer Left Outer Join Sales On customer.custid = sales.custid
     Left Outer Join arcsales On customer.custid=arcsales.custid
   Group By customer.custid
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform