ערוך

שתף באמצעות


UPPER (NoSQL query)

APPLIES TO: NoSQL

Returns a string expression after converting lowercase character data to uppercase.

Note

This function automatically uses culture-independent (invariant) casing rules when returning the converted string expression.

Syntax

UPPER(<string_expr>)

Arguments

Description
string_expr A string expression.

Return types

Returns a string expression.

Examples

The following example shows how to use the function to modify various strings.

SELECT VALUE {
    lowercase: UPPER("adventureworks"),
    uppercase: UPPER("ADVENTUREWORKS"),
    camelCase: UPPER("adventureWorks"),
    pascalCase: UPPER("AdventureWorks"),
    upperSnakeCase: UPPER("ADVENTURE_WORKS")
}
[
  {
    "lowercase": "ADVENTUREWORKS",
    "uppercase": "ADVENTUREWORKS",
    "camelCase": "ADVENTUREWORKS",
    "pascalCase": "ADVENTUREWORKS",
    "upperSnakeCase": "ADVENTURE_WORKS"
  }
]

Remarks

  • This function doesn't use the index.
  • If you plan to do frequent case insensitive comparisons, this function may consume a significant number of RUs. Consider normalizing the casing of strings when ingesting your data. Then a query like SELECT * FROM c WHERE UPPER(c.name) = 'USERNAME' is simplified to SELECT * FROM c WHERE c.name = 'USERNAME'.