Hi Team,
Here i have two data tables DT_1 and DT_2,
DT_1:
DT_2:
for each row in DT_2 “Phone Number” if this Phone Number is not present in DT_1 “phone” then i need to pick that data row from DT_2 and update in another excel which is DT_Final(Output). as shown below
DT_Final:
Please suggest any solution through LINQ
Thanks and regards,
Sai Adarsh.
Gokul001
(Gokul Balaji)
November 23, 2022, 2:04pm
2
Hi @adarsh_kotagiri
Can you share the sample excel file
Regards
Gokul
Gokul001
(Gokul Balaji)
November 23, 2022, 2:07pm
3
Hi @adarsh_kotagiri
Check out this video link
Regards
Gokul
2 Likes
Hi @Gokul001 , Please find the below attachemnt
Data.xlsx (10.7 KB)
Yoichi
(Yoichi)
November 23, 2022, 2:16pm
5
Hi,
Can you try the following sample?
DT_Final = DT_2.AsEnumerable.Where(Function(r) not DT_1.AsEnumerable.Any(Function(r2) r2("Phone").ToString=r("Phone Number").ToString)).CopyToDataTable.DefaultView.ToTable(False,{"Date","Phone Number","Currency"})
Sample20221123-2aL.zip (10.6 KB)
Regards,
3 Likes
Hi @adarsh_kotagiri
PFBL for compare two datatable using LINQ.
Hi @supermanPunch , thank you for your response. I need to use two columns, the “Amt” and “PAN” from each table to determine the duplicates.
1 Like
Thank you so much @Yoichi , now i cleared the concept
1 Like
system
(system)
Closed
November 26, 2022, 3:27pm
8
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.