Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Another weird issue with ANSI SQL
Message
From
08/02/2003 00:35:08
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00750934
Message ID:
00750946
Views:
25
>That would work too. I guess, I wasn't clear in my previous message. You could change UNION to UNION ALL and it would work. UNION should be only used in the queries that could produce duplicate records, to eliminate those duplicates. UNION ALL is also faster because it doesn't do anything with result set. UNION, on other hand, does DISTINCT on the result set. That's where VFP generates an error on memo fields because it doesn't compare them for performance reason.

I never realized that. That means, that in some cases, I could have eliminated the use of GROUP BY. I guess the UNION will use the first field for that detection.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform