Export (0) Print
Expand All
ABS
ALL
AND
ANY
AVG
bit
COS
COT
DAY
EXP
GO
IN
LEN
LOG
MAX
MIN
NOT
OR
PI
SET
SIN
STR
SUM
TAN
USE
VAR
Expand Minimize
3 out of 8 rated this helpful - Rate this topic

UPPER

SQL Server 2000

Returns a character expression with lowercase character data converted to uppercase.

Syntax

UPPER ( character_expression )

Arguments

character_expression

Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data.

Return Types

varchar

Remarks

character_expression must be of a data type that is implicitly convertible to varchar. Otherwise, use the CAST function to explicitly convert character_expression.

Examples

This example uses the UPPER and RTRIM functions to return the trimmed, uppercase author's last name concatenated with the author's first name.

USE pubs
GO
SELECT UPPER(RTRIM(au_lname)) + ', ' + au_fname AS Name
FROM authors
ORDER BY au_lname
GO

Here is the result set:

Name                                                           
-------------------------------------------------------------- 
BENNET, Abraham                                                
BLOTCHET-HALLS, Reginald                                       
CARSON, Cheryl                                                 
DEFRANCE, Michel                                               
DEL CASTILLO, Innes                                            
DULL, Ann                                                      
GREEN, Marjorie                                                
GREENE, Morningstar                                            
GRINGLESBY, Burt                                               
HUNTER, Sheryl                                                 
KARSEN, Livia                                                  
LOCKSLEY, Charlene                                             
MACFEATHER, Stearns                                            
MCBADDEN, Heather                                              
O'LEARY, Michael                                               
PANTELEY, Sylvia                                               
RINGER, Albert                                                 
RINGER, Anne                                                   
SMITH, Meander                                                 
STRAIGHT, Dean                                                 
STRINGER, Dirk                                                 
WHITE, Johnson                                                 
YOKOMOTO, Akiko                                                

(23 row(s) affected)

See Also

Data Types

String Functions

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.