Import from CSV
От | xuan thang |
---|---|
Тема | Import from CSV |
Дата | |
Msg-id | 988143.4270.qm@web55509.mail.re4.yahoo.com обсуждение исходный текст |
Ответы |
Re: Import from CSV
|
Список | pgsql-admin |
Hi,
I'm using The PostgresSQL Interactive Terminal In PostgresSQL 8.1.4.
When I import a table from csv file by command "copy table from './table.csv' with csv header", DB Engine add a new line sequence (\n) after a new line sequence(\n) in origin data automatically.
Example:
My data in Employee.csv file: (this file is exported by The PostgresSQL Interactive terminal )
ID Name Address
1 John City (one new line sequence here)
Country
2.................................................................................
I use The PostgresSQL Interactive terminal to import this csv file to DB by command:
"\copy Employee from './Employee.csv' with csv header"
After import , I have data in table Employee of Postgres DB.
ID Name Address
1 John City (original new line sequence here)
(a new line sequence added here automaticaly)
Country
2.................................................................................
Please help me to import origin data in csv into table.
Thanks alot!
Xuan Thang.
I'm using The PostgresSQL Interactive Terminal In PostgresSQL 8.1.4.
When I import a table from csv file by command "copy table from './table.csv' with csv header", DB Engine add a new line sequence (\n) after a new line sequence(\n) in origin data automatically.
Example:
My data in Employee.csv file: (this file is exported by The PostgresSQL Interactive terminal )
ID Name Address
1 John City (one new line sequence here)
Country
2.................................................................................
I use The PostgresSQL Interactive terminal to import this csv file to DB by command:
"\copy Employee from './Employee.csv' with csv header"
After import , I have data in table Employee of Postgres DB.
ID Name Address
1 John City (original new line sequence here)
(a new line sequence added here automaticaly)
Country
2.................................................................................
Please help me to import origin data in csv into table.
Thanks alot!
Xuan Thang.
You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.
В списке pgsql-admin по дате отправления: