MS Access UCase() Function

The UCase() function in MS Access converts a string to uppercase. This is a very common and useful function for data cleaning, ensuring consistency in your text data, and for making case-insensitive comparisons.



UCase(): Definition and Usage

UCase() is a simple but powerful way to standardize text data. It changes all lowercase letters in a string to uppercase, leaving other characters unchanged. This is often used to create consistent text formats for reporting or to perform case-insensitive searches (where the letter casing doesn't matter).

Syntax

Syntax

UCase(text)
      

Parameter Values

Parameter Description
text The string you want to convert to uppercase. This is required.

Related Function

For converting strings to lowercase, use the LCase() function.

Example

Converting a Column to Uppercase

This example converts the 'CustomerName' column in the 'Customers' table to uppercase. (Assumes a 'Customers' table exists with a 'CustomerName' column.)

Syntax

SELECT UCase(CustomerName) AS UppercaseCustomerName
FROM Customers;
      
Output

UppercaseCustomerName
-----------------------
(The uppercase versions of all customer names from the Customers table will be displayed here.)
      

**Note:** The example output will vary depending on the data in your `Customers` table. Each row will display the uppercase version of the `CustomerName` for that row.