Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subqueries as a field expression?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00200658
Message ID:
00200681
Vues:
8
Would it work if changed to something like this?

Select custid,sum(cost) as cost from orders into cursor tmp1 where cType = 'fruit' group by custid
Select custid,sum(cost) as cost from orders into cursor tmp2 where cType = 'beverage' group by custid
Select company.custid,companyname,tmp1.cost as fruitcost, tmp2.cost as BeverageCost From company LEFT JOIN tmp1 ON company.id=tmp1.custid LEFT JOIN tmp2 ON company.id = tmp2.custid
Into cursor tmp3

I am wondering if the syntax on the join would work since I have 12 actual subselects and the way that you originally had it would involve more temp cursors.
Derek Agar
Acctware Business Systems
derekagar@acctware.com
ICQ: 42332100

***********************
When in trouble call 911

He that dwelleth in the secret place
of the most High shall abide under
the shadow of the Almighty.
Psalm 91:1
***********************
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform