Edit

Share via


UPPER (NoSQL query)

The UPPER function returns a string expression after converting lowercase character data to uppercase.

An Azure Cosmos DB for NoSQL system function that returns a string expression with lowercase characters converted to uppercase.

Syntax

UPPER(<string_expr>)

Arguments

Description
string_expr A string expression.

Return types

Returns a string expression.

Examples

This section contains examples of how to use this query language construct.

Convert strings to uppercase

In this example, the UPPER function is used to convert various string cases to uppercase.

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 utilize the index.