Hi,
I have a data table DT1 with two columns
DT1 :
I need a solution which removes duplicates from both the columns.
Thanks in Advance.
Hi,
I have a data table DT1 with two columns
DT1 :
I need a solution which removes duplicates from both the columns.
Thanks in Advance.
Hi @Jnanesh_Ballal,
You can use remove duplicate rows activity.
Or
DataTable1 =DataTable1.DefaultView.ToTable(true,“country_1”,“country_2”)
Hi,
Can you share expected output?
Regards,
Expected output
First first column dt.DefaultView.ToTable(True,"Country_1")
For second column dt.DefaultView.ToTable(True,"Country_2")
These are to be used in assign and you would get output with single column and unique values
Cheerd
Thanks,@Harshith_Adyanthaya
I have used the
DataTable1 =DataTable1.DefaultView.ToTable(true,“country_1”,“country_2”)
but duplicates are not removed
Hi @Jnanesh_Ballal
dt.AsEnumerable.GroupBy(Function(r) Tuple.Create(r"Country_1").ToString,r(“Country_2”).ToString)).Select(Function(g) g.First).CopyToDataTable
Regards
Mohini
Yes as you dont have a common duplicate…I have you two commands for each and then you can paste the data side by side in your excel using two write range activities
cheers
Hi, @Jnanesh_Ballal
Try this one
DT1.AsEnumerable().groupby(Function(a) Tuple.create(a(“Country_1”).ToString.Trim,a(“Country_2”).ToString.Trim)).Select(Function(b) b.First).CopyToDataTable()
Regards,
Yajnesh
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.