Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Duplicate results from a unioned Select
Message
De
05/09/2000 08:29:50
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00411880
Message ID:
00412409
Vues:
20
Hi Mark,

FYI, It is possible to do the grouping in each select. You are right though, only 1 ORDER for the entire SQL statement is permitted. (From what I've seen). In what limited experience I have, I have been able to do it with free tables, VFP database & ORACLE database.

select Field1, sum(Field2) from Table;
where Field3 ! = "XXX";
group by Field1;
union select Field1, sum(Field2) from Table2;
where Field3 ! = "XXX";
group by Field1
ORDER BY Field1

Mike
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform