| From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
|---|---|
| To: | David Blomstrom <david(dot)blomstrom(at)gmail(dot)com> |
| Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Importing CSV File |
| Date: | 2015-10-27 15:44:08 |
| Message-ID: | CAMkU=1wGvwQ=hC+gHCrJVGkBoMUv8HwAUK8mdAatsazmcFzOJQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Mon, Oct 26, 2015 at 2:45 PM, David Blomstrom <david(dot)blomstrom(at)gmail(dot)com>
wrote:
> I tried to import a CSV file into a PostgreSQL table using pgAdmin III. I
> got an error message: "extra data after last column."
>
>
> All my spreadsheets have an "end of data" column that has /r/n in each
> cell. When I import a CSV file into a MySQL table, everything beyond /r/n
> is ignored. Is there some way to tell PostgreSQL to stop at /r/n?
>
How does it know when to stop ignoring and start the next record?
You could write a little awk or perl script to give the PROGRAM option of
copy, but you can't do that within pgAdmin.
Cheers,
Jeff
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2015-10-27 16:04:08 | Re: Importing CSV File |
| Previous Message | Leo Baltus | 2015-10-27 14:41:40 | Re: psql --quiet |