Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to normalize my list
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01151443
Message ID:
01151735
Views:
37
>Also remove GROUP BY because it's unnecessary and only applies to the select statement it included in.
>
>So when UNIONing, SELECT DISTINCT is implicit? Or can I put the 5 SELECTs in parentheses and the GROUP BY would then apply to all?

Yes, the UNION w/o ALL performs implicit DISTINCT. You cannot apply GROUP BY to the result of the UNION query. On other hand, the ORDER BY applies to the result set not to the individual SELECTs in the UNION query.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform