1 year ago
#332508
Rogue258
Getting a ANY or ALL Error in Teradata SQL Code
I have a Teradata SQL code
select SUM(col_A)/COUNT(col_A)
from table_A
where col_B in (select col_C from table_B
where col_D in ('1','2','3')
and col_E = 'N'
and col_F = 'AC'
and col_G = to_date('12/31/9999','MM/DD/YYYY')
and col_H like ('P0','Q0')
and col_I = 'Y'
and col_J > 0
and col_K between (current_date-90) and (current_date)
The subquery with col_C runs fine on its own, however when I run the full code, I am getting the
[Error 3785] [SQLState 42000] Expected ANY or ALL is missing error.
I don't understand why the error shows as I don't see any parenthesized list specified as the right operand of a comparison predicate.
sql
teradata
any
teradatasql
0 Answers
Your Answer