hey everyone,
i got a data table variable with 3 columns (name, age, height). now i want to check if there are at least 2 people who got the same name (i.e. not alle name entries are unique). is there an easy way to do this?
regards
hey everyone,
i got a data table variable with 3 columns (name, age, height). now i want to check if there are at least 2 people who got the same name (i.e. not alle name entries are unique). is there an easy way to do this?
regards
Can you share the sample input and expected Output?
Hi,
How about the following expression?
dt.AsEnumerable.GroupBy(Function(r) r("name").ToString).Where(Function(g) g.Count>1).Count
This returns 2 when input is as the following.

Regards,
dt.AsEnumerable().GroupBy(Function(row) row.Field(Of String)("Name")).Any(Function(g) g.Count() > 1)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.