Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Excluding almost duplicates from a UNION
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00524751
Message ID:
00525384
Vues:
25
I'll give it one last try. :)

I need to combine two tables with identical structures. One contains current records, one contains history records. Some records are in both tables. I am using a UNION and a subselect to get first the current records, then the history records that aren't already in current (the duplicates).

The letter I assign to it lets me know which table they came from. If the user chooses a record that exists only in the history table (ie: has an "H"), I need to do something special. I don't care about the "C"s, but I had to put something to make the SELECTs UNION compatable.

So, by removing duplicates, I am removing any "H" records that match a "C" record. All the remaining "H" records I know must exist only in the history table.

Does that make sense? I hope so since I don't know how to explain it any better, and yes, it is working now. :)

Michelle


>Maybe I am just not getting the problem. Anyway, I am glad you found and answer for it.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform