BookmarkSubscribeRSS Feed
ScottBass
Rhodochrosite | Level 12

This would not give the correct results.

Try WHERE compress("   Compare Value   ") = "Compare Value" to see what I mean.


Please post your question as a self-contained data step in the form of "have" (source) and "want" (desired results).
I won't contribute to your post if I can't cut-and-paste your syntactically correct code into SAS.
statguy22
Calcite | Level 5

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

TomKari
Onyx | Level 15

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

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 17 replies
  • 6052 views
  • 0 likes
  • 10 in conversation