0

I'm trying to import csv file's informations to PostgreSql using python.

The problem is When new informations are added from the beginning of number 1..., it needs to be continued where the database table's number stopped at.

For example. Last number is stopped at 300 in database table. And when I update excel file there will be new informations starting from number 1 again. It needs to be continued from 301 when new informations added. How can I achieve to this ? Please, help me.

9
  • You're looking to perform an UPSERT. Try this solution: stackoverflow.com/questions/61366664/… Commented Dec 10, 2021 at 9:28
  • But I don't want to update new informations. New informations row must be continued where the old table's row stopped at. For example last row was at 300 and when I add new csv file it needs to be continued from 301. Commented Dec 10, 2021 at 9:52
  • Thats what an upsert does, if the data is already there it will leave it alone Commented Dec 10, 2021 at 9:58
  • Hmm, but it shouldn't leave it alone, anyway new data needs to be in the next row (301)... Commented Dec 10, 2021 at 10:03
  • How can I do it ? Commented Dec 10, 2021 at 10:03

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.