Hello everyone. I’m doing filtering with linq. I have a dt1 that looks for a value in a dt2, if the dt2 contains the value, it deletes it and keeps the ones it doesn’t contain in a dt3. The query looks like this
This way works:
(From r In dt1.select()
Where dt2.select(“[ColumnName”]=‘" + r(“ColunName”).tostring+"’"
).count=0
Select r).CopytoDataTable
But instead “=” i need .contains
(From r In dt1.select()
Where dt2.select(“[ColumnName”]Like%‘" + r(“ColunName”).tostring+"%’ "
).count=0
Select r).CopytoDataTable (Doesnt work)
(From d in dt1.AsEnumerable()
Let vc = d("ColName").toString.ToUpper
Let chk = dt2.AsEnumerable.Any(Function (d2) d2("ColName").toString.ToUpper.Contains(vc))
Where Not chk
Select r =d).CopytoDataTable