Question I will ask is easy to understand; I have 2 datatables, lets call them “mainDT” and “otherDT”, SO I compare these 2 datatables row counts if they are same I move forwards, If they are not I stop the execution and log the message saying rows counts are not same.
IF I am comparing these two examples, I want to get extra or missing value from the MainDT, In this case “Alex is missing” is the name I need because its the missing row, but lets say:
It seems like in either case you want OtherDT to match MainDT. You could do an inner join on both DTs (ijDT).
If rows.count match for all 3 DTs, the OtherDT = MainDT. If they do not match, you would need two similar logic blocks using “For Each Row” on both MainDT and OtherDT.
If a row is in MainDT, but not ijDT, the row is missing from OtherDT.
If a row is in OtherDT, but not ijDT, the row is extra in OtherDT.
There are probably slightly faster ways to do the above, but you need to be careful overusing things like “Count” since presumably OtherDT could have both a missing row, and an extra row, so count would match the MainDT.
What I want is if their row count is not equal, IF MainDT has an extra row which name is the extra row, IF maindt has less row than otherdt which name is missing in MainDT.
yea I know, I have other checks in the other steps so thats why I dont need the detailed check in this step. Let me try the solution you gave, I will let you know. Thank you