I am trying to substract two timestamp columns All the examples I've found show this approach:
SELECT time1 - time2 DAY TO SECOND
This works so far. However when I try to do something like this:
SELECT COALESCE(time1 - time2 DAY TO SECOND, 0)
what I get is:
ERROR  [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error: expected something between the 'current_timestamp' keyword and the 'day' keyword. 0 records returned. SELECT Command Failed.
Am I missing paretheses, or something else? What is the correct syntax?