Re: Really easy problem...
| От | Oliveiros d'Azevedo Cristina |
|---|---|
| Тема | Re: Really easy problem... |
| Дата | |
| Msg-id | 89ED2F11C2EC47F2B45031FE3AA9E275@marktestcr.marktest.pt обсуждение исходный текст |
| Ответ на | Really easy problem... (James David Smith <james.david.smith@gmail.com>) |
| Ответы |
Re: Really easy problem...
|
| Список | pgsql-novice |
Howdy, James,
Have you tried adding column names?
COPY master_table_interpolated (date_time, person_id) ...
?
Just took a look at this http://www.postgresql.org/docs/9.0/static/sql-copy.html
Best,
Oliver
----- Original Message -----From: James David SmithSent: Thursday, August 02, 2012 12:12 PMSubject: [NOVICE] Really easy problem...Hi everyone,I'm struggling with something which I'm sure should be REALLY easy. But I can't quite get it to work. I've got a CSV file with two columns which looks like the below:2012-07-15 10:00:00, 12012-07-15 10:00:00, 22012-07-15 10:00:00, 32012-07-15 10:00:00, 42012-07-15 10:00:00, 5I want to copy the data into this table:CREATE TABLE master_table_interpolated(
date_time TIMESTAMP WITH TIME ZONE,
person_id INTEGER,
person_location GEOMETRY);So the data from the CSV file should go into the first two columns of my table, and leave the final one blank. I use this query to pull the CSV file in, however I can't figure out how to map the data to the correct columns in my table.COPY master_table_interpolated from 'C:/Program Files/PostgreSQL/9.0/data/basetime.csv' DELIMITERS ',' CSV;Ideas please?ThanksJames
В списке pgsql-novice по дате отправления: