I need to insert a value into a Teradata table that has a timestamp( 6) field named trigger_timestamp. I’m deriving a SAS datetime macro variable named _triggerRunDt. Loading &_triggerRunDt into trigger_timestamp returns the error ‘Teradata execute: Invalid operation for DateTime or Interval’ but the value is loaded correctly: Teradata documentation has this explanation for the error message: 5407 Invalid operation for DateTime or Interval. Explanation: An operation that requires an appropriate DateTime or Interval data type or value, and it does not. Can anyone suggest how to get rid of the error? I don’t have a problem loading Teradata date fields, only timestamps. Here are the relevant sections from the log. Thanks in advance. MPRINT(ONE): libname refTabls teradata user="GIB_TEST" password="{SAS002}9B8C3F4E4E42CE1D1693C5F648AE11641F188708" server='ROCK.GIBRALTER.COM' database=MAIN mode=ansi connection_group=cefGroup dbsaslabel=none dbsliceparm=(none); NOTE: Libref REFTABLS was successfully assigned as follows: Engine: TERADATA Physical Name: ROCK.GIBRALTER.COM MPRINT(RUN_CREATE): ; MPRINT(RUN_CREATE): data _null_; MPRINT(RUN_CREATE): triggerRunDt=DHMS(today(),hour(time()),minute(time()),second(time()))+60*60*5; MPRINT(RUN_CREATE): call symputx('_triggerRunDt',triggerRunDt); MPRINT(RUN_CREATE): format triggerRunDt datetime.; MPRINT(RUN_CREATE): put _all_; MPRINT(RUN_CREATE): run; triggerRunDt=23AUG17:18:10:09 _ERROR_=0 _N_=1 _TRIGGERRUNDT=1819131009.2 MPRINT(RUN_CREATE): proc sql; MPRINT(RUN_CREATE): insert into refTabls.PROCESS_TRIGGER (cmpn_cd, cmpn_type_cd, prod_test_cd, process, analyst_id, email_list_id_1 , source_schema, source_object, trigger_timestamp, delayed_process, delayed_suffix) values("600210", "HEP", 'TEST', 'CMPN_CREATE' , "bullwinkle@home.com", "rocky@home.com'", "DT_D_CHESS", "P10081_LOAD_TABLE", 1819131009, 'NA', 'NA'); ERROR: Teradata execute: Invalid operation for DateTime or Interval. NOTE: The following 1 column(s) in REFTABLS.WFPDMHL_CEF_PROCESS_TRIGGER have been automatically dropped because they have a datatype that is not supported by this engine: delayed_output_list NOTE: 1 row was inserted into REFTABLS.WFPDMHL_CEF_PROCESS_TRIGGER. MPRINT(RUN_CREATE): quit;
... View more