Two data table contains 1lakhs row data.I need to compare two data table each row and find out unmatched row from first data table.But data table have more than 1 lakhs data.
HI,
How about the following if you need to compare whole the row?
dtResult = dt1.AsEnumerable.Except(dt2.AsEnumerable,DataRowComparer.Default).CopyToDataTable()
Regards,
I have tried this linq query.It took more than 45 mins.I need to compare easy way and quickly.
Hi,
I think it’s too slow for the expression. Is there possibility to take a lot time to read it from excel?
Can you check actual time to process the expression using LogMessages etc?
Regards,
Try usign excel as a db …then the data retrieval can be fast and we can use a single query to get the unmatched rows as well…
Cheers
Two data table comparisons took long time.Its took more time for linq query comparsion activity.
can you explain in details.I have two data table and contains more than 1 lakhs row data in two data table.
This is how you can get excel as DB Using Excel As Database
then use a query to get the unmatched records
SELECT * FROM table1
EXCEPT
SELECT * FROM table2;
cheers