How compare tables using Left join

Hi,

comparing the two tables using left join and values present both the data tables but output picking from only dt1.

Hi @Manaswini_UI,

You can try the following solutions:

  1. If the issue is due to missing matches, change the join type to Inner Join and debug from there.
  2. If it’s a data type issue, consider using CStr() or CInt() before performing the join.
  3. If the column names don’t match, use Trim to remove any extra spaces and ensure they are correct.

Let me know if you need further assistance!

@Manaswini_UI

Can you please show the output and input you got

ideally it would get all columns

cheers

Left Join will include all rows from the left DataTable and the matching rows from the right DataTable

Based on your screenshot - output should contain only rows from dt_NewStep1 and values from dt_NewEqualJoinOut where the index values match

Let us know if it is different from this behaviour

Also if the second table contains same column names - It will be displayed as ColumnName_1. If the column names are different - output table should have columns from second table as well

In short - Number of rows = Number of rows in Table1
Number of Columns = Table 1 + Table 2

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.