Skip to content
Advertisement

Data type when reading from a TSV-file (postgresql)

Im reading data from a tsv-file to a postgresql table. The problem I have is that in one column (death year) it is either a year or N if the actor is not dead yet. If i try to use INTEGER as data type I get an error because of the N. Do anyone know how to solve this?

This is my table:

Then I import the data from the csv-file:

And I get the following error:

Thank you.

Advertisement

Answer

COPY takes a parameter, NULL.

Please try this:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement