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
and result is -
It is an exact match, but why do UiPath doesn’t match and join it here ?
supriya117
(Supriya Allada)
May 22, 2024, 2:02pm
2
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:
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
Happy Automation
Yoichi
(Yoichi)
May 22, 2024, 2:04pm
3
Hi,
There might be some extra charcter such as whitespace etc. So, can you try to check content of the datatable in details?
Regards,
postwick
(Paul Ostwick)
May 22, 2024, 2:18pm
4
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.
Yoichi
(Yoichi)
May 22, 2024, 2:19pm
5
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,
postwick
(Paul Ostwick)
May 22, 2024, 2:21pm
6
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.
supriya117
(Supriya Allada)
May 22, 2024, 2:59pm
7
@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.