Skip site navigation (1) Skip section navigation (2)

Re: copy command and column attribute

From: toni hernández <toni(at)sigte(dot)udg(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: copy command and column attribute
Date: 2009-03-31 07:39:55
Message-ID: 49D1C8CB.4000402@sigte.udg.edu (view raw or flat)
Thread:
Lists: pgsql-admin
Thanks a lot Guillaume,

It worked!!

Guillaume Lelarge escribió:
> 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.
>
>
>   

In response to

pgsql-admin by date

Next:From: ashok rajDate: 2009-03-31 08:00:42
Subject: procpid for temp schema
Previous:From: Tena SakaiDate: 2009-03-31 00:43:32
Subject: Re: Logging in with postgres remotely

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group