I am unable to formulate search query using IN
clause for Azure Cosmos document DB
Query
{
\"query\": \"SELECT * FROM LOA
If you use a parameterized IN list with sqlQuerySpec, then it will be considered as a single value when the parameter is expanded.
Please use convenient way to write your query is to use ARRAY_CONTAINS instead and pass the list of items as a single parameter. Please adjust your query like this:
SELECT * FROM LOADS l WHERE ARRAY_CONTAINS(@schedulingSystem, l.schedulingSystem,false)
"parameters": [
{
"name": "@schedulingSystem",
"value": "['A','B']"
}
]
Similar question for your references:
1.https://github.com/Azure/azure-cosmos-dotnet-v2/issues/614
2.WHERE IN with Azure DocumentDB (CosmosDB) .Net SDK