General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only