5 Replies Latest reply: May 14, 2014 9:41 AM by Andrei Kaliahin RSS

    Script error (Invalid timestamp in Teradata

    Gyanaranjan Tripathy

      Hi All,

      I'm hitting an error in Teradata as invalid timestamp  (SqlState: S1000, ErrorCode: 4294960536, ErrorMsg: [Teradata][ODBC Teradata Driver][Teradata Database] Invalid timestamp.)

       

      Below is the script.

       

      Max:
      load *;
      SQL select
      Max(MODIFIED_DATE) AS A
      from TABLE1 WHERE  ACTIVE_FLAG='N';

      let maxDate= Timestamp(Peek('Max',0,'A'));

      Drop Table Max;

       

      TBL:

      Load*,

      Sql select

      Field1,

      Field2,

      Field3

      from TABLE1 WHERE  ACTIVE_FLAG='Y' OR  (ACTIVE_FLAG='N' AND MODIFIED_DATE>= cast ('$(maxDate)' as TIMESTAMP(0) FORMAT 'MM/DD/YYYYBHH:MI:SS')) AND MANUAL_FLAG='Y';

       

      Please suggest what's going wrong here.

       

      Thanks in advance