Join Datatable not working for me

Hi Guys,

I have a dt_PreviousDownload as below -

Legacy Cost Centre,Period

910017000000,4

910017000000,5

and dt_DailyReport as below -

Legacy Cost Centre,Period

910017000000,5

910017100000,5

910017200000,5

910017300000,5

910018000000,5

910018100000,5

910018200000,5

910018300000,5

910017000000,4

910017100000,4

910017200000,4

910017300000,4

910018000000,4

910018100000,4

910018200000,4

910018300000,4

I am using the Join Datatable, to join the the dtpreviousdownload data with those matching in the dtDailyReport and save in dtDailyReport

image

and result is -

image

It is an exact match, but why do UiPath doesn’t match and join it here ?

Hi @shikharno.7

Change the Join type to “Inner Join” to keep only the matching rows or “Full Join” to keep all the rows.

For more, check this:

Happy Automation

Hi,

There might be some extra charcter such as whitespace etc. So, can you try to check content of the datatable in details?

Regards,

Changing the join type doesn’t fix this issue.

@shikharno.7 is the datatype of both columns the same? If one is string and the other is integer then the join won’t work.

Or, if you read these datatable from different source and/or different format type in worksheet, it may be cause of this problem.

For example,

  • One is from CSV using readCSV, the other is from Excel in numeric format using ReadRange.
  • One is from Excel in text format, the other is from Excel in numeric format

Regards,

What is the result you’re trying to achieve? You have two datatables with the same two columns and duplicate data, so a join doesn’t really make sense here. The typical purpose of a join is to pull data together, for example you have one table with User ID and Name, and another table with User ID and Company, so you do a join on User ID to end up with a table that has all three columns.

@postwick

The LEFT JOIN keyword returns all records from the first table, even if there are no matches in the second table.

Only first table is getting as per results share by @shikharno.7
So I thought it might be the issue.