I have created table with query:
CREATE TABLE Z (
A varchar(30),
B varchar(30),
C timestamp,
D numeric,
E varchar(30),
F varchar(30),
G varchar(30),
H numeric
);
Now, I have a csv file with delimiter '|' and entries in this file are like
1313131|131313131|20130103115041|20.0000000|ABCD|EFGH||0.0000000
I am trying following command to import the data in the table:
\copy Z from filename WITH (FORMAT CSV , DELIMITER '|', NULL '');
But I am getting following error:
ERROR: invalid input syntax for type timestamp: "20130103115041"
CONTEXT: COPY Z, line 1, column C: "20130103115041"
I guess I have to specify the timestamp format while creating table so that it can accept the input in "YYYYMMDDHHMMSS" format.
Any ideas?
Thanks in advance.