我有两个具有相同列数的数据表。我必须检查哪个名称在新数据表中有不同的组或子组。(Using Linq
)
DataTableOLD
CODE NAME GROUP SUBGROUP
c1 AA GP1 SGP1
c2 BB GP1 SGP1
c3 CC GP1 SGP2
c4 DD GP1 SGP2
c5 EE GP2 SGP3
DataTableNEW
CODE NAME GROUP SUBGROUP
c1 AA GP1 SGP4
c2 BB GP1 SGP1
c3 CC GP3 SGP5
c4 DD GP1 SGP2
c6 FF GP2 SGP3
Resultant table (show only those where there is mismatch in either group or group and subgroup both)
OLDCODE OLDNAME OLDGROUP OLDSUBGROUP NEWCODE NEWNAME NEWGROUP NEWSUBGROUP
c1 AA GP1 SGP1 c1 AA GP1 SGP4
c3 CC GP1 SGP2 c3 CC GP3 SGP5