# Updating records selectively during CSV import \[Jun 28\]

**URL:** <https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576>\
**Category:** Discord-Discussions\
**Created:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576 "2022-11-03T10:15:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/1 "2022-11-03T10:15:33Z")

</div>

> 🙋‍♂️ **niroknox** _asked_

## Hello, newbie here.

#### My question is possibly to do with primary key but i am not sure:

#### 

#### I uploaded a CSV with 100,000 users - works fast and very happy - search and filter works great

#### 

#### I now wish to enrich them as I got more info about 50,000 of the users, but i can’t seem to find a way to do an Update. so it would add duplicated records, is there a way when importing to ask it to update records if USERNAME field (for example) already exists? if the answer is not - is there another way to do what i want to achieve?

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/2 "2022-11-03T10:15:34Z")

</div>

> 👨‍🦲 **dstala** _replied_

#### \<@990927987765563392\> That’s not possible from UI. You will have to write a script & use SDK / API to update records selectively.

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/3 "2022-11-03T10:15:36Z")

</div>

> 🙋‍♂️ **niroknox** _replied_

#### I see. are there any ready-made scripts or tools for that?

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/4 "2022-11-03T10:15:37Z")

</div>

> 🙋‍♂️ **niroknox** _replied_

#### I am on postgres - perhaps PGAdmin can do that?

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/5 "2022-11-03T10:15:38Z")

</div>

> 💁 **o1lab** _replied_

#### Have not tried to upload csv anytime

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/6 "2022-11-03T10:15:39Z")

</div>

> 💁 **o1lab** _replied_

#### [How to Import CSVs to PostgreSQL Using PgAdmin | LearnSQL.com](https://learnsql.com/blog/how-to-import-csv-to-postgresql/)

#

---

<div class="post-metadata">

**Author:** ![NocoDB](https://avatars.discourse-cdn.com/v4/letter/n/6f9a4e/32.png) [@NocoDB](https://community.nocodb.com/u/NocoDB)\
**Post date:** [November 3, 2022, 10:15am UTC](https://community.nocodb.com/t/updating-records-selectively-during-csv-import-jun-28/576/7 "2022-11-03T10:15:40Z")

</div>

[Autogenerated from discord](https://discord.com/channels/661905455894888490/990928775967539210)

* * *

#### Join [NocoDB’s](http://www.nocodb.com/) community

[Discord](https://discord.gg/5RgZmkW) • [Twitter](https://twitter.com/nocodb) • [Reddit](https://www.reddit.com/r/NocoDB/) • [Docs](https://docs.nocodb.com/)
