Use variable in query without doble quote

Hello everyone !
I currently used a variable in my query with an IN clause, so my variable is in my case a sequence of words between simple quotes and separated by a comma.

It goes well, my variable takes the right value and at the time of passing it to my request it is surrounded by double quotes and therefore my claus IN does not work ...
Does anyone have a way around this?

Thanks in advance!

1 Like

Hello!

I have started using the = ANY(array) clause rather than IN because of this behavior in Retool. You can build a new SELECT statement to use as the data for the array used in the ANY clause or format objects as an array if you are pulling from a more complex dataset.

2 Likes

Hey @bastienLeday! As @pyrrho mentioned, using the =ANY(array) syntax should solve this for you. We have a post here, that goes into a few of the intricacies of the different flavors of SQL in Retool. Have a great one!

1 Like