Executing this statement in Teradata SELECT EOMONTH(GETDATE(), -2) AS month_calculated
outputs
Data Type GETDATE does not match a Defined Type name
What is wrong with this syntax?
CodePudding user response:
The above syntax is for the SQL server, For teradata we have to use
SELECT ADD_MONTHS (DATE , -2);
- DATE in Teradata will get the current date
- ADD_MONTHS lets you add or subtract a number of months