Re: using copy to insert data.

From: "Chad Thompson" <chad(at)weblinkservices(dot)com>
To: "pgsql-novice" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: using copy to insert data.
Date: 2003-02-06 17:47:29
Message-ID: 00c101c2ce07$d215c450$32021aac@chad
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Postgresql 7.3 will allow you to copy data into specific columns

copy table (col1, col2) from 'filepath' with delimiter ',';

HTH
Chad

----- Original Message -----
From: "Jennifer Lee" <jlee(at)scri(dot)sari(dot)ac(dot)uk>
To: <pgsql-novice(at)postgresql(dot)org>
Sent: Thursday, February 06, 2003 9:40 AM
Subject: [NOVICE] using copy to insert data.

> I'm trying to insert data from a delimited file using the copy command
> (COPY table FROM 'filepath') this works fine, but I would like to insert
> data into specific columns. I've read that this is possible but haven't
> been able to find documentation on how to do it. I've been able to
> insert the data as I'd like in two steps. 1. copy into a temporary table,
2.
> insert using select columns from the temporary table. Is there a way to
> do this in one step?
>
> Thanks much,
> Jennifer
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Andrew McMillan 2003-02-06 18:01:39 Re: Html output
Previous Message Jason Earl 2003-02-06 17:46:52 Re: Favorite Linux Editor for PostgreSQL Scripts?