Re: csv improt to table

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Jude DaShiell <jdashiel(at)panix(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: csv improt to table
Date: 2015-06-13 23:56:18
Message-ID: CAKFQuwaR0ukFkp_3Q9G0PoHmaZKy=+Nf0x-C7rLY=e=AQE61oQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Saturday, June 13, 2015, Jude DaShiell <jdashiel(at)panix(dot)com> wrote:

> I read the documentation and built a command and tried it and got a syntax
> error.

Re-read the syntax and examples on this page. Your first problem, as noted
by the error message, is that the word "to" does not immediately follow the
word copy.

http://www.postgresql.org/docs/9.4/interactive/sql-copy.html

> Before I ran the command, I changed all single quotes in the csv file to
> double quotes. I copied the command and the generated error onto my
> clipboard so what follows is a paste into this message.
> Cut here.
> copy to health /home/jude/health.csv format csv header force-not-null;
> ERROR: syntax error at or near "to"
> LINE 1: copy to health /home/jude/health.csv format csv header force...
>
>
David J.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2015-06-14 00:00:55 Re: csv improt to table
Previous Message Jude DaShiell 2015-06-13 22:57:31 Re: csv improt to table