orreymalcolm
IS-IT--Management
Hello,
I am currently working on database where I need to compare 2 tables with each other and see which data in table 1 is not already in table 2. Table2 has a mix of data sorted by an ID number and table 1 is sorted by a another type of ID code.
The problem lies here. Table 2 needs to have everything table 1 has inside of it, but many times (approx 500), but because there is already some of table 1 data in table 2, I can't have the data overwrite itself.
Is there a way to do this? I've been looking at using the UNION ALL statement in conjunction with INSERT INTO and a few others. I hope there is a solution to this.
Thanks in advance!
I am currently working on database where I need to compare 2 tables with each other and see which data in table 1 is not already in table 2. Table2 has a mix of data sorted by an ID number and table 1 is sorted by a another type of ID code.
The problem lies here. Table 2 needs to have everything table 1 has inside of it, but many times (approx 500), but because there is already some of table 1 data in table 2, I can't have the data overwrite itself.
Is there a way to do this? I've been looking at using the UNION ALL statement in conjunction with INSERT INTO and a few others. I hope there is a solution to this.
Thanks in advance!