Hi,
I adjusted the csv, changing the semi-column with column and inserting the quote for character. Now it seems to be better but I got another error. This last is due to the fact that oid column in my postgresql table is a serial and I did not filled it in csv because I was thinking that would have been filled-in automatically during the data import. What do you suggest on this regard? How can I solve? E. From: farjad.farid@xxxxxxxxxxxxxxxxx To: frippe12573@xxxxxxxxxxx; pgsql-general@xxxxxxxxxxxxxx Subject: RE: csv import error Date: Tue, 23 Sep 2014 12:03:15 +0100
Hi,
Quotation marks should be around both the name of each and every column and their values.
As the columns names are all lower case. You may wish to remove all quotation marks which is much easier. But character value needs quotation mark.
Also replace the semi-column as column separation character with commas for sql insert statement. What has happened here is that the values from CSV are directly inserted into sql. It needs a little bit of extra work. Hope this helps.
Best Regards
Farjad Farid
From: pgsql-general-owner@xxxxxxxxxxxxxx [mailto:pgsql-general-owner@xxxxxxxxxxxxxx] On Behalf Of Eugenio Trumpy
Hello, LINE 1: INSERT INTO "info_pozzi_hydrocarbon"."assorb" ("key;daprof;a... ^ In statement:
1001334;19.1;21;A;6;;;11 1001334;93.5;94;A;30;;;11 1001334;94;115;A;20;;;11 1001334;154.5;255;A;644;;;11 1001334;273;282;A;4;;;11 1001334;298;309;A;7;;;11 1001334;432;1224;P;1850;;;11 4277001;121;901;A;397;ALLARGAMENTO FORO;;11 4277001;121;901;A;96;PERFORAZIONE;;11 |