Help using Base SAS procedures

how to use string function to choose rows whose variable including special letters

Reply
Regular Contributor
Posts: 222

how to use string function to choose rows whose variable including special letters


how to use string function to choose rows whose variable including special letters?

Thanks

Mike

Example: want keep rows whose name including'Jo' or 'Ro';

data need ;

set sashelp.class;

if find(name,'Jo','Ro');

run;

Super User
Posts: 10,048

Re: how to use string function to choose rows whose variable including special letters

Posted in reply to Mike_Davis

How about:

data need ;
set sashelp.class;
where name contains 'Jo' or name contains 'Ro';

run;


Ksharp

Ask a Question
Discussion stats
  • 1 reply
  • 127 views
  • 0 likes
  • 2 in conversation