UPPER (Azure Cosmos DB)
APPLIES TO:
SQL API
Returns a string expression after converting lowercase character data to uppercase.
The UPPER system function does not utilize the index. If you plan to do frequent case insensitive comparisons, the UPPER system function may consume a significant amount of RU's. If this is the case, instead of using the UPPER system function to normalize data each time for comparisons, you can normalize the casing upon insertion. Then a query such as SELECT * FROM c WHERE UPPER(c.name) = 'BOB' simply becomes SELECT * FROM c WHERE c.name = 'BOB'.
Syntax
UPPER(<str_expr>)
Arguments
str_expr
Is a string expression.
Return types
Returns a string expression.
Examples
The following example shows how to use UPPER in a query
SELECT UPPER("Abc") AS upper
Here is the result set.
[{"upper": "ABC"}]
Remarks
This system function will not use indexes.