In Cosmos Scope / SQL how to compare a column country with a list of value ignoring case.
SELECT * FROM student WHERE student_name IN ("aLpHa", "BetA", "GamMa")
In Cosmos Scope / SQL how to compare a column country with a list of value ignoring case.
SELECT * FROM student WHERE student_name IN ("aLpHa", "BetA", "GamMa")
The following query should work in cosmosdb
select * from json j where LOWER(j.student_name) IN ("alpha", "beta", "gamma")
You can have a UDF
as well,
udf:
function convertLower(str){
return str .toLowerCase();
}
and use it as
SELECT * FROM c where udf.lowerConvert(c.student_name) IN ("alpha", "beta", "gamma")
You can use lower()
:
SELECT * FROM student WHERE lower(student_name) IN ("alpha", "beta", "gamma")
Or alternatively, user upper()
respectively.