I have a table with about 500 records. I have another table that has another 5,000. I want the 5,000 records from the second table to populate the table that has 500 records.
1st Note: Here's the catch. If the same record exists in both tables I want to keep the one that is in the original table(the one with 500 records). Basically never delete any records in the original table.
2nd Note: Also, there is no Primary Key. So, to identify if the records are the same, I would need to compare 3 fields(firstname, lastname and companyname):
Basically, delete record from 2nd table if there is a matching record in the 1st table. Then, I could easily combine them.
Can this be done with a SQL statement? If not, can someone suggest how I can go about this programmatically?
Thanks SO much in advance.
Josu