Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Record Table
Message
De
16/07/1997 22:49:45
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/07/1997 21:46:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00040341
Message ID:
00040346
Vues:
39
>As part of my thesis at Navy Postgraduate School, I have a genetic algorithm that runs in MS VFP 5.0. The output of the GA is a table with approximately 15 fields and usually about 5000 unique records. Every time I run the GA, I save the output in a table archive. Now, I have approximately 20 tables in the archive.
>
>I would like to create a new table which retrieves only the unique records from each of these 20 archived tables. There are no repeat records within each table. Again, each table has the same structure. I have tried appending records, which works, but it does not eliminate repeats. Is there a way of automatically eliminating repeats after the appendage? Or is there a method of using the 'join' (or some other) feature to do this? For each table, there is approximately 20%-30% intersection, so doing it manually is out of the question.
>
>Thank you,
>LT Jason W. Carter
>U.S. Navy

There are a lot of ways to do these. Some are only possible and fast in case your structure lets it. But you have only about 100000 records totally and just 20 tables here is a simple way that is fast enough even on a 386.

As I understand you have already appended all of them into one big table, so you need only one SQL :

select * from BIGTABLE ;
union ;
(select * from BIGTABLE)

By union a table with itself you eliminate duplicates.
If you haven't appended them a small routine similar to above will do the job (Or just use APPEND).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform