Is there a way to use a subquery as a field expression in VFP5?
ex:
select CompanyName, (select sum(cost) from orders where custid = company.custid and cType = 'fruit') as TotalFruit, (select sum(cost) from orders where custid = company.custid and cType = 'beverage') as TotalBeverage from company order by CompanyName
Derek Agar
Acctware Business Systems
derekagar@acctware.comICQ: 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
***********************