Skip to main content
Question

Insert record in table postgres

  • February 18, 2019
  • 4 replies
  • 38 views

checcosisani
Contributor
Forum|alt.badge.img+12

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

4 replies

david_r
Evangelist
  • 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+12
  • Author
  • Contributor
  • February 18, 2019
david_r wrote:

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+12
  • Author
  • Contributor
  • February 18, 2019
david_r wrote:

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+12
  • 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


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings