Delete duplicate row based on one column duplicate data

Hi,
I want to delete rows that have the same data in a certain column. So for example I have 5 columns in my data table and a lot of rows.
There are duplicates in ‘column 3’. I want to delete the entire row if there are duplicate codes in ‘column 3’ even though column 1,2,4 ,5 etc may not be duplicate.
Only the first data row should be there, and duplicate should get deleted.

please help.

2 Likes

@Ankit1

1 Like

Dear Sandeep, I tried it and ran the code.
It ran fine but when I checked the output , the rows have not been deleted.

Also I guess the column which I am using is Mobile no, so integer type, but when I tried to change datatype to Integer or double, it gives error as “specified cast is not valid”
And on running as string type, it gives no error , but also row dont get deleted.
Please suggest

2 Likes

Also have attached the input data, based on column name Moile No., we have to delete duplicate row.
Please see if you can help.data.xlsx (11.9 KB)

1 Like

RemoveDuplicateRows.xaml (5.3 KB)

The above attached workflow will remove the repeated mobile number rows.

Thanks

2 Likes

Thanks Praneet, but i was expecting output in data table form

2 Likes

just use this expression dt = arrDataRow.CopyToDataTable

2 Likes

No praneeth, even after using arrDataRow and using same code as you attached, the duplicates rows are not getting deleted.
The process run fine but row do not get deleted :slightly_frowning_face:

can i have the xaml please.

Actually, it was my fault praneet. Sorry.
Its working fine now

Thanks a lot… :blush:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.