rssgcmy
Programmer
- Dec 27, 2007
- 4
Hi all
I have two tables from two different branches that i need to combine while at the same time remove any duplicates. I used the following SQL statement:
However, some duplicates are not removed by virtue of having one different field value. For example:
table 1
01092009, 300.00, REC1234, HQ222
Table 2
01092009, 300.00, REC1234, BR222
The above records are identical except having different branch codes. How to compare the two records by ignoring the branch code while keeping only one as the other is a duplicate? Thanks in advance
I have two tables from two different branches that i need to combine while at the same time remove any duplicates. I used the following SQL statement:
Code:
Select * From table1 Union Select * From table2 Into Table MERGED2
However, some duplicates are not removed by virtue of having one different field value. For example:
table 1
01092009, 300.00, REC1234, HQ222
Table 2
01092009, 300.00, REC1234, BR222
The above records are identical except having different branch codes. How to compare the two records by ignoring the branch code while keeping only one as the other is a duplicate? Thanks in advance