Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Union, Group By and Sum question
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00463430
Message ID:
00463464
Views:
10
To add to Cindy's response, the reason you need to do this with 2 queries instead of one, is that a UNION is a combination of 2 queries in one statement, each of which can have its own GROUP BY clause. So, you can't take the results and get a single value for each combination of Custno, Column2 and Column3 unless you join the results of both queries first, and then group them in a second query.
Previous
Reply
Map
View

Click here to load this message in the networking platform