The spaces between the lines cause the interpreter to get confused. `$ () Converts a list of characters to characters.
q)t:([] a:1 2 3; name:`$("coca cola";"pepsi";"milk"))
q)select from t where name in `$("coca cola";"pepsi")
a name
-----------
1 coca cola
2 pepsi
You can also be careful with the case and either use lower or upper case sequentially, which will lead to unexpected empty results:
q)select from t where name in `$("Coca Cola";"Pepsi")
a name
------
q)select from t where upper[name] in upper `$("Coca Cola";"Pepsi")
a name
-----------
1 coca cola
2 pepsi
source
share