Asked • 04/15/19

Is it possible to do a case-insensitive DISTINCT with SAS (PROC SQL)?

Is there a way to get the case-insensitive distinct rows from this SAS SQL query? ... SELECT DISTINCT country FROM companies; The ideal solution would consist of a single query. Results now look like: Australia australia AUSTRALIA Hong Kong HONG KONG ... where any of the 2 distinct rows is really required One could upper-case the data, but this unnecessarily changes values in a manner that doesn't suit the purpose of this query.

Tom O.

tutor
use the upper() or lower() function, when I want to select case insensitive I might do something like this: select * from table where upper(name) is "TOM";
Report

04/15/19

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.