Re: command line v GUI and COPY
От | John Polo |
---|---|
Тема | Re: command line v GUI and COPY |
Дата | |
Msg-id | 543D6E19.5040503@okstate.edu обсуждение исходный текст |
Ответ на | Re: command line v GUI and COPY (jared <afonit@gmail.com>) |
Ответы |
Re: command line v GUI and COPY
|
Список | pgsql-novice |
On 10/14/2014 12:11 PM, jared wrote:
"CN","PLT_CN","INVYR","STATECD","UNITCD","COUNTYCD","PLOT","SUBP","SUBPTYP","BNDCHG","CONTRAST","AZMLEFT","AZMCORN","DISTCORN","AZMRIGHT","CYCLE","SUBCYCLE","CREATED_BY","CREATED_DATE","CREATED_IN_INSTANCE","MODIFIED_BY","MODIFIED_DATE","MODIFIED_IN_INSTANCE"
"202492243010854","157287634010478",2008,40,1,5,131,2,1,,2,276,0,,70,7,1,"",2011-05-02,"10854","",,""
I used Notepad++ to open the file and get rid of the quotes and just leave the trailing commas for the three empty fields. Still the same error message. I tried again, deleting the commas trailing after "10854" to see if that would get rid of the problem. Just in case, I opened in LibreOffice Calc, I can't see any other contents in the cells. I couldn't find anything in the fields, tried to delete them anyway. Searched the web and came across the comment about adding to an existing table. I still don't know what's causing the problem.
John
Yes. I created the DB "FIA" with it and in the tree under "Tables", right-clicking has an option for New Table, but I don't know which of the tabs, if any, let me import existing data at the time of creating the new table in the pgadmin menu.for GUI, do you have pgadmin installed?
This is how the data originally appears in the file. The error says it was in row 2. It looked like there was an extra pair of quotes and then an odd quote at the very end.For the 'extra data after the last column'The error should have given you a row number. Did you open up the file and that row number and make sure there wasn't?
"CN","PLT_CN","INVYR","STATECD","UNITCD","COUNTYCD","PLOT","SUBP","SUBPTYP","BNDCHG","CONTRAST","AZMLEFT","AZMCORN","DISTCORN","AZMRIGHT","CYCLE","SUBCYCLE","CREATED_BY","CREATED_DATE","CREATED_IN_INSTANCE","MODIFIED_BY","MODIFIED_DATE","MODIFIED_IN_INSTANCE"
"202492243010854","157287634010478",2008,40,1,5,131,2,1,,2,276,0,,70,7,1,"",2011-05-02,"10854","",,""
I used Notepad++ to open the file and get rid of the quotes and just leave the trailing commas for the three empty fields. Still the same error message. I tried again, deleting the commas trailing after "10854" to see if that would get rid of the problem. Just in case, I opened in LibreOffice Calc, I can't see any other contents in the cells. I couldn't find anything in the fields, tried to delete them anyway. Searched the web and came across the comment about adding to an existing table. I still don't know what's causing the problem.
John
В списке pgsql-novice по дате отправления: