We've encountered this error a few times while processing our loads in Netezza. We use 'select now()' to insert the current timestamp into a column in the Log table. Since we have concurrent jobs running, it may so happen that multiple commands are issued within a second.
Could this be the cause of the error? If yes, what could be the possible resolution. Any help would be appreciated. Thanks!
The error is telling you that you are trying to insert '' into a timestamp field.
create temp table testtab ( tm timestamp );
insert into testtab values ('');
ERROR: Bad timestamp external representation ''
Thanks Shawn, but we're pretty sure there are no '' (null) values being inserted into a timestamp field.
We always use 'select now()' everywhere. Could this fail to return a valid timestamp as a result of which the error is being generated?
Did you try using the CURRENT_TIMESTAMP reserved word instead of 'select now()'?