Reputation: 107
I am using NZLOAD to load a massive .csv file into a netezza machine. This .csv is a 30GB extract from an older database, so updating the formats is a challenge.
I have a field in the database that is causing problems. The field represents the date that a customer performed some action. Because most customers have not performed the action, they have null values. NULL values for this field default to "0000-00-00 00:00:00".
The following error (not surprisingly) results:
1: 2(222) [22, TIMESTAMP] day is zero, ""0000-00-00"[ ]
Do you have any suggestions for working around this error?
Upvotes: 1
Views: 301
Reputation: 4295
datatype
of the field in question is varchar(30)
nzload
to the new tableSelect cast(case when textfield = '0000-00-00 00:00:00' then null
else textfield end
as timestamp)
from new table
Upvotes: 1