O'Reilly logo

Step-by-Step Programming with Base SAS 9.4 by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required