Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing double records, math problem
Message
De
15/06/2007 11:00:19
 
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 XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01233421
Message ID:
01233494
Vues:
9
Doing a SELECT-distinct with a UNION or an INDEX Unique on APPENDed tables is simple enough....

.... BUT ....

The removed duplicates should be evenly distributed amongst the 4 origins! So that makes it a lot more complex...


>>Edward also made it clear to me that I am didn't describe that aspect clear enough. Rreading my text, I understand that.
>>
>>The resulting table should be a concatenation of the 4 tables, with all duplicates removed, but that should happen in an evenly distributed way, like the numerical examples displayed.
>>
>
>Lennert,
>
>If you wish all duplicates removed, then it is called distinct records. If you wish duplicates NOT INCLUDED, then it is called unique records.
>
>Cannot see and cannot understand what the "proportion" is here for.
>
>To get distinct records (where there are all unique records, and only one if duplicates found) then you can use UNION.
>
>
>sele DIST * from table1;
>UNION;
>sele DIST * from table2;
>......
>
>
>To get unique records only you may use something like:
>
>sele * from table1;
>UNION ALL;
>sele  * from table2;
>UNION ALL;
>......
>into cursor tempcrs
>
>SELE * from cursor group by field1,field2, field3,...., field_last HAVING count(*)=1
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform