Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GROUP BY clause ignored in VIEWS with UNION Clause
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 7
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01575879
Message ID:
01575884
Vues:
50
View definitions in VFP are independent of each other. If one view references another, the second view is executed and the result is used as if it were a table. Unless you include a GROUP BY in the second view, also, you wouldn't see grouped data. Keep in mind that a UNION contains an implicit DISTINCT operation which in turn does an implicit ORDER BY on every field. Compare the results of the following two queries to see what I mean:
SELECT Type, id FROM SYS(2005)
SELECT Type, id FROM SYS(2005) UNION SELECT Type, id FROM SYS(2005)
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform