do you want to check one by one for every row or you want to check all the rows at once
try this once
for comparision use the below query
d1.aseumerable.where(function(x) dt2.asenumerable.any(function(r) cdbl(x("Quantity).tostring)<cdbl(r(“Quantity”).tostring))).copytodatatable