10 Nov
2009
10 Nov
'09
2:57 p.m.
Hi, I ran into the following problem: I used the COPY command to upload a large number of records and I got an error saying that a particular field was expecting an int. In the file which I am trying to upload fields are separated with commas ",", and records are separated with new-line characters - "\n". The value it was trying to upload and failed was basically an empty field - ",,". I worked around the problem by setting every entry in the column that was not set to zero - so the field would get its int, and later changing it back to null in the table. But it seems like a common task to upload null values into an integer column, so why would it fail?