Comparing Characters
Types of Character Comparisons
Some special situations occur when you
make character comparisons. You might need to perform the following
tasks:
-
compare uppercase and lowercase characters
-
select all values that begin with a particular group of characters
-
select all values that begin with a particular range of characters
-
find a particular value anywhere within another character value
Comparing Uppercase and Lowercase Characters
SAS distinguishes between uppercase and lowercase letters
in comparisons. For example, the values
Madrid
and MADRID
are not equivalent. To compare values that might occur in different cases, use the UPCASE function to produce an uppercase value. Then make the comparison between ...Get Step-by-Step Programming with Base SAS 9.4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.