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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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