Hi,
I am facing one problem,
I have two dt
dt1 -
ID
1
2
3
4
dt2-
ID
4
5
6
I just want rows present in dt1 but not in dt2.
Hi,
I am facing one problem,
I have two dt
dt1 -
ID
1
2
3
4
dt2-
ID
4
5
6
I just want rows present in dt1 but not in dt2.
Hey @Sahil_Garg1
Left join
using Join Data Table
activity would be a good option to go with.
Thanks
#nK
dt1.asEnumerable.Except(dt2.AsEnumerable, DataRowComparer.Default).CopyToDataTable
can share one test flow
Plz watch the below video…If you want both similar you can use Intersect and only rows from Dt1 then use Except.
In case that an empty result is also to expect the copytodatatable can be defensive handled as described here:
It is return no rows,
It is giving incorrect result as i want 1,2,3 but it is including 4 also
is data exact as the 1 column structure data from the description above or is another dataset is used e.g. with more columns?. Can you show the used test data?
Test.xlsx (9.0 KB)
Yes, only 1 col is there ID
find some demo / starter help here:
DataTable_SetOperations.xaml (8.9 KB)
kindly note: Except / set operation operators are using the entire row for the check (so 2,n cols were also working with the same command).
We will soon run it with your data
it was working, can you please share some details of your implementation? Thanks
Buddy,
I test data which i shared with u, i want out of rows 1…25, which are unique in dt1.
I have done it through loops and complex conditions but just looking if any query can do it to make it faster
Main.xaml (5.9 KB)
my bad, just doing one silly mistake got it now.
Thanks everyone for quick responses
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.