CSV Utility
am 06.08.2009 23:27:22 von Mike angelo
--0-1223251341-1249594042=:63955
Content-Type: text/plain; charset=us-ascii
Is there a Postgres utility that allows data contained in a CSV file to be loaded into the database?
--0-1223251341-1249594042=:63955
Content-Type: text/html; charset=us-ascii
Is there a Postgres utility that allows data contained in a CSV file to be loaded into the database?
--0-1223251341-1249594042=:63955--
Re: CSV Utility
am 06.08.2009 23:29:00 von Bricklen
Take a look at the "CSV" option of "COPY". That should do what you're after.
http://www.postgresql.org/docs/8.4/interactive/sql-copy.html
On Thu, Aug 6, 2009 at 2:27 PM, Mike angelo wrote:
> Is there a Postgres utility that allows data contained in a CSV file to be
> loaded into the database?
>
>
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: CSV Utility
am 06.08.2009 23:30:57 von Guillaume Lelarge
Le jeudi 6 ao=FBt 2009 =E0 23:29:00, bricklen a =E9crit :
> Take a look at the "CSV" option of "COPY". That should do what you're
> after.
>
> http://www.postgresql.org/docs/8.4/interactive/sql-copy.html
>
You can also use pgloader, a great python tool.
--=20
Guillaume.
http://www.postgresqlfr.org
http://dalibo.com
--=20
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: CSV Utility
am 06.08.2009 23:40:16 von Steve Crawford
Mike angelo wrote:
> Is there a Postgres utility that allows data contained in a CSV file
> to be loaded into the database?
>
You mean like psql?
\copy tablename from csvfilename CSV
or with a header:
\copy tablename from csvfilename CSV HEADER
or an alternate delimiter:
\copy tablename from csvfilename CSV delimiter '|'
or export data (tab-delimited):
copy foo to stdout CSV DELIMITER E'\t';
Cheers,
Steve
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Re: CSV Utility
am 07.08.2009 07:11:46 von Beena J P
This is a multi-part message in MIME format.
--Boundary_(ID_o4W/UTujxMBmHtnO3VywBw)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Command to import data from text file to postgresql table
1. Create table of the same order os text file. Then execute the command at Query analyser.
copy tablename from textname (with path) CSV
eg: copy friends.office1 from 'C:/FRIENDS/ksebsouth.txt' CSV
regards
Beena
----- Original Message -----
From: Mike angelo
To: pgsql-admin@postgresql.org
Sent: Friday, August 07, 2009 2:57 AM
Subject: [ADMIN] CSV Utility
Is there a Postgres utility that allows data contained in a CSV file to be loaded into the database?
--Boundary_(ID_o4W/UTujxMBmHtnO3VywBw)
Content-type: text/html; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Command to import data from
text file to postgresql table
1. Create table of
the same order os text file. Then execute the command at Query
analyser.
copy tablename
from textname (with path) CSV
eg: copy friends.office1
from 'C:/FRIENDS/ksebsouth.txt' CSV
regards
Beena
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
----- Original Message -----
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From:
To:
href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgre sql.org
Sent: Friday, August 07, 2009 2:57
AM
Subject: [ADMIN] CSV Utility
style="FONT-SIZE: 10pt; COLOR: #000000; FONT-FAMILY: verdana,helvetica,sans-serif">
Is there a Postgres utility that allows data contained in a CSV file to
be loaded into the database?
--Boundary_(ID_o4W/UTujxMBmHtnO3VywBw)--
Re: CSV Utility
am 07.08.2009 07:12:15 von Beena J P
Command to import data from text file to postgresql table
1. Create table of the same order os text file. Then execute the command at
Query analyser.
copy tablename from textname (with path) CSV
eg: copy friends.office1 from 'C:/FRIENDS/ksebsouth.txt' CSV
regards
Beena
----- Original Message -----
From: "Steve Crawford"
To: "Mike angelo"
Cc:
Sent: Friday, August 07, 2009 3:10 AM
Subject: Re: [ADMIN] CSV Utility
> Mike angelo wrote:
>> Is there a Postgres utility that allows data contained in a CSV file to
>> be loaded into the database?
>>
> You mean like psql?
>
> \copy tablename from csvfilename CSV
>
> or with a header:
> \copy tablename from csvfilename CSV HEADER
>
> or an alternate delimiter:
> \copy tablename from csvfilename CSV delimiter '|'
>
> or export data (tab-delimited):
> copy foo to stdout CSV DELIMITER E'\t';
>
> Cheers,
> Steve
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin