BKM
1
Hey, I am trying to use the values from a multiselect in a sql query with a
SELECT * FROM table
WHERE something in ({{ multiselect.value }})
I am using a presto DB, and I am having issues because the multiselect.value
resolves to , value1
.
How do I handle that silly comma so that my query has the correct syntax?
I'm not entirely sure as for your use case, but personally I use regex if there is anything I want to remove or replace.
In your case I believe it would be ({{ multiselect.value.replace(/,/g, '')}})
which should simply just replace the comma with nothing.
Thanks for chiming in here shane_d_gray! @BKM does that suggestion resolve your issue?