This would not give the correct results.
Try WHERE compress(" Compare Value ") = "Compare Value" to see what I mean.
If you google "SAS Character Functions", there is an excellent .pdf file from the SAS support web site that explains all of the character functions in SAS (including functions that eliminate various types of spaces).
You shouldn't be having a problem with this. Here's an example that works for me in EG:
1. Bring SASHELP.SHOES into your project. If you check the properties for the dataset, the Product field is 14 long.
2. Start the Filter and Sort task against SASHELP.SHOES.
3. Select all of the columns for the result, and select the Filter tab. In Filter, set Product Equal to Boot (note the capitalization matters.) Don't change anything else, and run the query. It should work fine.
The filter in Query Builder works on this example as well.
Let us know what happens when you try this.
Tom
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.