tb303
Supreme Member
- Dec 18, 2011
- 1,238
- 902
Hi BHW,
I have a data table with columns "name","phone","login","password" as columns
I want to remove all the rows where "name" & "phone" are duplicated.
But im having a hard time coming up with a google search to find my answer.
I know I can do it based on one column like this...
but that doesnt work if you have two people with the same name but different phone numbers.
Any one point me in the right direction?
I have a data table with columns "name","phone","login","password" as columns
I want to remove all the rows where "name" & "phone" are duplicated.
But im having a hard time coming up with a google search to find my answer.
I know I can do it based on one column like this...
Code:
Dim primaryKey(1) As DataColumnprimaryKey(0) = newdataset.Tables("tablename").Columns("name")
newdataset.Tables("tablename").PrimaryKey = primaryKey
newdataset.Tables("tablename").Merge(originaldataset.Tables("tablename"), True) 'merge in unique only
newdataset.Tables("tablename").PrimaryKey = Nothing
but that doesnt work if you have two people with the same name but different phone numbers.
Any one point me in the right direction?