Skip to main content
Question

Insert record in table postgres

  • February 18, 2019
  • 4 replies
  • 70 views

checcosisani
Contributor
Forum|alt.badge.img+14

Hi all

 

I'm sorry probably my SQL knowledge is too less but I tried to append some records to an existing table postgresql but I received this error

 

Bulk copy failed on table 'Slist_ITA.List_StreetName' using delimiter ':'. Error was 'ERRORE: un valore chiave duplicato viola il vincolo univoco "List_StreetName_pkey"

DETAIL: La chiave (id)=(3554) esiste già .

CONTEXT: COPY List_StreetName, riga 1

'

A fatal error has occurred. Check the logfile above for details

... Last line repeated 2 times ...

 

I attach also the picture of wb (very simple)

 

 

Thx for help

 

Francesco

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • February 18, 2019

Looks like you have a duplicate primary key on the "id" column when inserting the new records.

If this is a one-off workspace you can manually find the largest value of "id" in the existing table and the use a Counter to set new "id" values starting on that value + 1.


checcosisani
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • February 18, 2019

Looks like you have a duplicate primary key on the "id" column when inserting the new records.

If this is a one-off workspace you can manually find the largest value of "id" in the existing table and the use a Counter to set new "id" values starting on that value + 1.

Hi

I tried to check if some duplicates are present but no duplicate but the ID is mandatory ?

 

I tried also to create new id with new values but always errror

 

thx

 

Francesco


checcosisani
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • February 18, 2019

Looks like you have a duplicate primary key on the "id" column when inserting the new records.

If this is a one-off workspace you can manually find the largest value of "id" in the existing table and the use a Counter to set new "id" values starting on that value + 1.

Hi

 

solved

 

I recreated the id in the postgres table and now it works

 

thx

 

Francesco


checcosisani
Contributor
Forum|alt.badge.img+14
  • Author
  • Contributor
  • February 19, 2019

Hi all again...

 

sorry I know my limit in POstgreSQL but where I can find a good tutorial to migrate MS Access DB in PostgreSQL ?

 

thx for help

 

Francesco