Hi Team,
I want to filter rows using LINQ query … Can someone please help me in this ?
I have table like below
I want filter rows only rows which is having “HSM” value in accounts column… I tried filter data table activity but it is taking too much time and failing sometime since I have lakhs of records in my excel. So want to try using LINQ query
@J0ska @sreejith.ss
Thanks,
Naresh
1 Like
Hi @Mandava_Naresh
You can try this
dt_Data=dt_Data.AsEnumerable().Where(Function (row) row("Accounts").ToString.ToUpper.Trim.Equals("HSM")).CopyToDataTable
Gokul001
(Gokul Balaji)
July 28, 2022, 12:57pm
3
Hi @Mandava_Naresh
How about this expression
Dt.AsEnumerable.Where(Function(r) r.Item("Account").ToString.Equals("HSM")).CopyToDataTable
Regards
Gokul
postwick
(Paul Ostwick)
July 28, 2022, 12:59pm
4
LINQ isn’t any faster. It’s a myth. LINQ has to loop, too.
1 Like
This is working … Thank You very much @Gokul001
system
(system)
Closed
July 31, 2022, 1:02pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.