postgresql - Importing .csv to postgres. what to do with time? -
I want to import some .csv data into postgres and there is a problem with a data type:
One of my attributes is birthday:
1968-06-24 00:00:00 So I use timestamps, as Pgmodeler has been suggested by. Although I always get the message:
postgres = # \ new_database Connect Now you are connected to the database "new_database" such as users "postgres" New_database = # \ copy players FROM '/ Users / Desktop /Rdaten/Data/players.csv 'DELIMITER'; ' Error: Error: Invalid input syntax for type timestamp: "NULL" CONTEXT: COPY player, line 267, column birthdate: " NULL "New_database = #
What can I do about it?
It is not certain that this is the same issue, but this error in trying to import CSV Found, where the zero value was listed as 'null' and it was fixed by adding 'blank null' to the copy command - by default the postgrass expected is NULL value to be input as an empty string.
Comments
Post a Comment