Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement