correlated column is not allowed in a non-equality predicate

Hi Team,

I am getting the error "correlated column is not allowed in a non-equality predicate" when trying to use "<=" operator in corelated subquery with aggregate. Do we have any other way to avoid this error in spark SQL(Matetrialized view).

A1.DATE_EFFECTIVE             =
                (SELECT MAX(A2.DATE_EFFECTIVE)
                   FROM     A2
                  WHERE  A2.DATE_EFFECTIVE       <= C1.DATE_EFFECTIVE


A1 AND A2 are same table with 2 different alias name. A1 AND C1  are from outer query

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 1 mth agoLast active
  • 1Replies
  • 21Views
  • 3 Following

Product Announcement

Incorta 5 is now Generally Available