I am using a statement as below and get this error:
SELECT Failed. 3771: Illegal expression in WHEN clause of CASE expression.
I had better hopes from Teradata. SQL Server can do it but Teradata can't. How can I work around this? Any solution?
sel ( CASE
WHEN EXISTS ( sel '1' from VolatileTable Dtb1 where Dtb1.c1=FACT_Table_5MillionRows.C1)
THEN "FACTTablew5MillionRows"."CustomColumName"
ELSE 'ALL OTHER'
END ) (NAMED "CustomColumName" )
from
"Db"."FACTTablew5MillionRows"