I am trying to filter some data based on another table hence using join data table activity.
Table 1 consists of 16000+ records and table 2 contains only 30 records with Prescription Number from table 1 matches with RxNumber of table 2. I am using inner join to remove data that does not match but I am getting zero rows. I have manually verified and all 30 records from table 2 are present in table 1. Can anyone help? @Palaniyappan
I assume you’re reading this data from Excel? Excel activities are a nightmare, they love creating datatable columns as datatype object. Here’s what you need to do. Do this for each datatable.
Add Data Column - STR Prescription Number - datatype String
I am reading data from excel in both datatables. YEs i can confirm data table rows are not 0. Infact If i change join type to full I get 16000+30 rows.
I can’t share the code, I just wrote the pseudo-code off the top of my head. Create string columns in each dt. Then two simple For Each Row in Data Table loops. Then remove original columns and rename the new columns you added.
If it was working before and isn’t now, possibly something changed with the source files so now the Excel activities are creating the columns as Object instead of string, datetime, etc.
If you want to only filter the data from table2 for what is matching with table1 then you can use linq directly to handle the same..use assign as below