Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excluding almost duplicates from a UNION
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00524751
Message ID:
00525384
Views:
24
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
Map
View

Click here to load this message in the networking platform