I am unable to run such queries . It says "Executed as Single statement. Failed [3654 : HY000] Corresponding select-list expressions are incompatible.
Elapsed time = 00:00:00.000
STATEMENT 1: Select Statement failed."
SELECT NULL AS FIELD1,
NULL AS FIELD2
CASE WHEN B.FIELD3 = 1 THEN NULL ELSE FIELD3 AS FIELD3
FROM VT_SIBHI2 B
Please help me on this
Hi, I faced the same issue. Here is how I resolved it.
What was the root cause - data type mismatch
what solved it - Data type of all correcponding feilds in the union needs to match. - I used CAST function to do that.
Example - SyntaxEditor Code Snippet
CAST('VIDEO' AS VARCHAR(50)) AS PRODUCT,