I am getting the following error when trying to use the formula in-db tool. This works as an if then statement in the formula tool, but not in the native SQL for the formula in-db tool. I am joining two queries from an in-db connection and then trying to run a formula in-db off of that join, that is where I get the error below. It is hitting Teradata. In the help for the "Formula In-db" tool, it says to use the CASE statement, but you do not need any Select statement. Any suggestions?
Formula Expression:
CASE WHEN "Field1" > "Field2" THEN "Field1"-"Field2" ELSE '0' END
Error:
Formula In-DB (34) Error SQLPrepare: [Teradata][ODBC Teradata Driver][Teradata Database] Syntax error, expected something like an 'EXCEPT' keyword or an 'UNION' keyword or a 'MINUS' keyword between the word 'STORE_NB