TPT - Casting VARCHAR to TIMESTAMP issue

Tools

TPT - Casting VARCHAR to TIMESTAMP issue

I have a flat file with sample record as shown below:

181606517|2015-09-17  20:00:53.438000|143112ac-55fb1bf2-b7f1-e|2|181606419|||||86871523|||143112ac-55fb1bf2-171|0|N||N|N|N|MANUAL

I have created the target table with column for date as timestamp. When I try to insert the record into the target table after casting:

CAST(UPDATE_STAMP AS TIMESTAMP(0) FORMAT ''yyyy-mm-ddBhh:mi:ss.SSSSSS''),

I am getting an error message:

TPT_INFRA: TPT02932: Error: Invalid token near line 186 (text was ':')

TPT_INFRA: TPT04017: Exception "Invalid token" caught during job script file parsing/compilation.

Any hint or pointers to fix the issue would really help.

1 REPLY
Teradata Employee

Re: TPT - Casting VARCHAR to TIMESTAMP issue

I would have to see more of the script to tell, but there is probably another single quote that needs to be escaped somewhere.

-- SteveF