Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Yet another 'Group By' question re SET EngineBehavior
Message
 
 
To
13/08/2005 17:56:07
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Miscellaneous
Thread ID:
01040687
Message ID:
01040738
Views:
19
Yes, they will but in the original post you said that you could use GROUP BY on all fields to get desired result. So which statement is correct?

>Does it? I mean, if there is a field Orders.Partno, and there are records for one OrdNbr that have different PartNos, won't those still come out as distinct records?
>
>Jim
>
>>If you don't have memo fileds in the table, following should work
>>SELECT DIST * FROM (
>>  SELECT Orders.*, tot.TOTAMT ;
>>    FROM Orders ;
>>      JOIN (SELECT OrdNbr, SUM(AMT) AS TOTAMT FROM Orders GROUP BY OrdNbr) tot ;
>>    ON tot.OrdNbr = Orders.OrdNbr
>>) dt1
>>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform