Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

With Teradata Studio why does a timestamp(0) export with trailing .0 - response (3) by gpolanch

$
0
0

Hello Francine,
Thank you for your response, and looking into this.  I tried to import via Studio, and yes, that worked - thanks.   But, our goal is to export and import high volumes of files and so the GUI is not workable for this situation.   To import, we are using a code generator to generate TPT scripts on the fly, calling TPT to import a delimited file into a staging table of all VARCHAR columns, then finally the code generator invokes a BTEQ insert/select (simplified examples below).   The SELECT is failing with either "invalid timestamp" or "invalid format string".   I'm a Teradata newbie, and cant seem to find the appropriate format string to account for the trailing .0.   Any help would be appreciated.  Thanks!
-Greg
INSERT INTO TARGET_TABLE
SELECT
CAST( MyTimeStamp AS TIMESTAMP(0) format 'YYYY-MM-DDBHH:MI:SS.S(1)')
FROM STAGING_TABLE;
INSERT INTO TARGET_TABLE
SELECT
CAST( MyTimeStamp AS TIMESTAMP(0) format 'YYYY-MM-DDBHH:MI:SS.9(1)')
FROM STAGING_TABLE;
INSERT INTO TARGET_TABLE
SELECT
CAST( MyTimeStamp AS TIMESTAMP(0) format 'YYYY-MM-DDBHH:MI:SS')
FROM STAGING_TABLE;
 
 


Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>