-
Like (0)
Hi,
I am trying to load a flat file with "Feb 20 2012 12:00:00:000AM" as the date format using nzload from the command prompt.
Following are the options I have chosen to load the date columns.
-dateStyle MONDY
-dateDelim ' '
-timeStyle 12HOUR
-timeDelim ':'
-timeRoundNanos
I am getting the following error when I am trying load it.
bad #: input row #(byte offset to last char examined) [field #, declaration] diagnostic, "text consumed"[last char examined]
----------------------------------------------------------------------------------------------------------------------------
1: 1(20) [1, TIMESTAMP] expected AM or PM, "Feb 20 2012 12:00:00"[:]
So -timeDelim value I have passed is not identifying the ":" before the milliseconds. Is there any alternative to load this using nzload?
Target column is defined as TIMESTAMP.
Appreciate your time and help.
Thanks
Netezza expects a decimal point for the fractional portion of seconds. You must change the format in the file before you can load it using NZLoad.
As an alternative, you can handle it in a query against an external table. Define the external table to receive the date column as a varchar, then manipulate the string (change the 3rd colon to a decimal point) and convert it to a timestamp type in the query. Or use NZLoad to load it into a table with varchar columns for the dates and convert them to timestamps in subsequent processes.
Nick, Thanks for the reply.

