From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Cc: | toni hernández <toni(at)sigte(dot)udg(dot)edu> |
Subject: | Re: copy command and column attribute |
Date: | 2009-03-30 15:40:04 |
Message-ID: | 200903301740.05087.guillaume@lelarge.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Le lundi 30 mars 2009 à 16:39:59, toni hernández a écrit :
> [...]
> I've been trying to import some data from a csv file to my database.
> I have some fields of the table that I want to keep so I typed
>
> copy mytable (column
> Affidabilita_stratigrafica,Ambiente,Anno,Componenti_geologici) FROM
> E'c://export_us_sg4.csv' with delimiter ',' csv quote as '"';
>
> This way I expect some fields to remain with the default value, but an
> error appears near "column"
>
> Am I typing it wrong?
Yes, there should be no COLUMN keyword in this statement.
copy mytable (Affidabilita_stratigrafica,Ambiente,Anno,Componenti_geologici)
FROM E'c://export_us_sg4.csv' with delimiter ',' csv quote as '"';
This should work better.
--
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2009-03-30 17:20:43 | Re: Hard link backup strategy |
Previous Message | Harald Fuchs | 2009-03-30 15:08:57 | Re: Partitionin with check functions |