# Remove duplicates before inserting into database

**URL:** <https://forum.uipath.com/t/remove-duplicates-before-inserting-into-database/23455>\
**Category:** Help\
**Tags:** database, activities\
**Created:** [February 21, 2018, 2:41pm UTC](https://forum.uipath.com/t/remove-duplicates-before-inserting-into-database/23455 "2018-02-21T14:41:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![arivu96](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@arivu96](https://forum.uipath.com/u/arivu96)\
**Post date:** [February 21, 2018, 6:43pm UTC](https://forum.uipath.com/t/remove-duplicates-before-inserting-into-database/23455/3 "2018-02-21T18:43:15Z")

</div>

Hi @jsmooth,  
Refer this post to how to remove duplicate records.

> [@DataTable filtering with expressions](https://forum.uipath.com/t/datatable/21692):
>
> Hi All, Use below code to remove empty row from the table. DataTable name-\>DataTableName Use assign activity DataTableName=DataTableName.Rows.Cast(Of DataRow)().Where(Function(row) Not row.ItemArray.All(Function(field) field Is DBNull.Value Or field.Equals(""))).CopyToDataTable() Re-usable Component pass Parameter as datatable you will get the answer. [RemoveEmptyRows.xaml](https://global.discourse-cdn.com/uipath/original/2X/1/18c0883a487d21d4e0c1031cfa692253af6718cf.xaml) (8.5 KB) Remove rows based on particular column is empty. DataTableName.Select("Convert(column3, System.String)\< \>''"…

Regards,  
Arivu 🙂

---

_[View the full topic](https://forum.uipath.com/t/remove-duplicates-before-inserting-into-database/23455)._
