From: | Rich Shepard <rshepard(at)appl-ecosys(dot)com> |
---|---|
To: | pdxpug(at)postgresql(dot)org |
Subject: | Re: Migrating Data from MySQL to PostgreSQL |
Date: | 2011-05-06 00:08:05 |
Message-ID: | alpine.LNX.2.00.1105051704490.16080@salmo.appl-ecosys.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pdxpug |
On Thu, 5 May 2011, Lacey L. Powers wrote:
> In all of the times where I've migrated data from MySQL to PostgreSQL,
> this is all I have needed, for example:
>
> COPY table (col1,col2,col3,col4) FROM stdin;
Lacey,
The data are not coming from stdin but from files on the disk.
I have at the bottom of the DDL file lines such as these:
COPY comments FROM 'comments.csv' WITH DELIMITER '|';
COPY experts FROM 'experts.csv' WITH DELIMITER '|';
and the first couple of lines of comments.csv are:
7|J. D. Hardy|animal|1996-06-13 14:51:08|1996-06-17
8|J. D. Hardy|annelida|1996-06-13 14:51:08|1996-06-17
I could add WITH NULL AS "" to the commands.
Thanks,
Rich
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2011-05-06 00:08:16 | Re: Any Excel Experts |
Previous Message | Tom Keller | 2011-05-06 00:06:54 | Re: Any Excel Experts |