Hello,
I’ve followed the step described in Mixing Queries and Arrays into SQL / Observable | Observable to get a query with a IN operator working:
then using selectedFundInstitRetail
in a SQL query running on Snowflake:
SELECT
...LONG...LIST...
FROM SNOWFLAKE
WHERE COLUMN_IN_QUESTION IN (${selectedFundInstitRetail})
Here comes the funny part:
- When I select both
Institutional
andRetail
, I only get Institutional in the results. - When I select only
Institutional
, I only get Institutional in the results. - When I select only
Retail
, I only get Retail in the results.
In short, one could say that the interpolation only uses the FIRST value of the array.
I tried to work around by separating the stuffs:
- Remove the WHERE clause in the above query.
- Create a new SQL Cell, with the above query as the source.
- Try applying the WHERE clause in there.
This yields the error:
Error: Invalid column type encountered for argument 0
.
Which I don’t get. Indeed that means I’m querying a JS Object “as if” a SQL database. But I understood that was a super-trick of Observable.
Thx for your Help.