Skip to content
Advertisement

How to verify if array list is empty in SQL

I have a multilist field returning a list of values.

My query is filtering the list using IN (list), but if the user do not select anything is list, it returns an empty list, or null (I can’t see).

I’m trying to do something like:

It works when I select none or one value, but if I select more than one it bring me an error.

I already tried to use:

I can’t modify the query in backend because i’m using Pentaho.

Advertisement

Answer

Maybe this? (not sure if I understand the end goal)

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement