I have two data tables like this
I want to check if (Emp Code+Name) in dt 1 exists in dt 2
I want to check if the item array exists
What is the best way to achueve this?
Kindly help…
Thanks
Valli
I have two data tables like this
I want to check if (Emp Code+Name) in dt 1 exists in dt 2
I want to check if the item array exists
What is the best way to achueve this?
Kindly help…
Thanks
Valli
You want to check the column names or you want to compare the rows of dt1 with dt2
I am getting a little bit confusion in your query, Could you be more elaborate your query and better to provide an example by showing two datatables look like.
this is my already existing DB:
my next DB like:
Need out put like:
Need to check if item array exist or not if exist do nothing , if not exist then append
Please try this in assign
dt = dt.AsEnumerable.Union(dt1.AsEnumerable,DataRowComparer.Default).CopyToDataTable
cheers
can you share Sample workflow please?
let me check and confirm @Anil_G
Okay @shaik.muktharvalli1
You can use the below LinQ Expression,
→ Use the Read range workbook activity to read the Excel1 and store in a datatable called Dt1.
→ Use another Read range workbook activity to read the Excel2 and store in a datatable called Dt2.
→ Use assign activity to write the LinQ Expression,
- Assign -> dt_Output = Dt1.AsEnumerable.Except(Dt2.AsEnumerable, DataRowComparer.Default).Select(Function(row) row).CopyToDataTable
→ After assign activity use the Append Range workbook activity to append the excepted results in Excel1.
Check the below workflow for better understanding,
Hope it helps!!
Check the output below for better understanding… @shaik.muktharvalli1
Hope you understand!!
If dt already existed , in dt1 same data present then have to check and remove duplicate entries if not then append into existed dt
It checking only one column , But I have to check all columns
If Name cloumn values same but Emp code value different then have to append
If both same compare to Existed DB then don’t append it
Do you want to check every column or you want to check only one particular column as you mentioned above Name column.
Could you be more specific… @shaik.muktharvalli1
Need to check all columns (Emp Code+Name)
Thnaks
Shaik
This xaml will check in all columns. It will match row values.
Thanks
Simple would be to use a merge datatable and then use a remove duplicates activity
cheers
I was about to post the same thing. Merge datatable, remove duplicates. Simple.