Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Understanding on UNION ALL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Novell 4.x
Database:
Visual FoxPro
Divers
Thread ID:
01102295
Message ID:
01102296
Vues:
13
Yes, you're correct. The UNION ALL returns all records including duplicate ones. My guess would be that either you got record counts for tables wrong or there're a lot of deleted records in one or both tables.

>I have two customer files. The first contains 6 million records. The second contains 2 million records. I haven't checked yet, but I believe all records have a customer id.
>
>After running the following select statement, I would expect to have a file of 8 million customer numbers. Instead, the select returns 6.7 million.
>
>It's my understanding the UNION ALL clause returns all rows spaning multiple tables - regardless of duplications. What am I missing? I haven't had a chance to play around with this yet, but I thought I'd post this in case someone can save me the time. Thanks in advance.
>SELECT CustomerID;
>FROM Customer01;
>INTO TABLE AllCustID;
>UNION ALL;
>SELECT CustomerID;
>FROM Customer02
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform