Hi,
I have queries to combine row 10 and 11 to remove duplicate:
(From d In NewDT
Group d By k1=d(10).toString.Trim, k2=d(11).toString.Trim Into grp=Group
Select grp.First()).toList
How i can add where condition on the queries if i only want to remove duplicate if row 11 not null? If row 11 is empty then no need to group with row 10.
Try this expression to remove Duplicate based on two rows
(From p in DtMaster.Select() where( From q in DtMaster.Select() where q(10).Equals(p(10)) AndAlso q(11).Equals(p(11)) Select q).ToArray.Count>1 Select p).ToArray.CopyToDataTable()