In this blog post, you’ll learn more about the Sybase Error Expression is not an array and the reason for receiving this error
Sybase SQL Error Message
Expression is not an array
Reason for this Error
You either tried to apply an ARRAY dereference (using double square brackets) to an expression that does not evaluate to an array, or else you tried to pass a non-ARRAY expression to UNNEST.