BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
P_Y
Calcite | Level 5 P_Y
Calcite | Level 5

How to filter out the number below start with "8187"? The format is string $CHAR8. Thanks

 

Example:

81861234

81876789

81886577

1 ACCEPTED SOLUTION
2 REPLIES 2
mkeintz
PROC Star

Try

where  string   ^=: '8187' ;

You can see more about the   =: operator at SAS Operators in Expressions

 

Go to the Character Comparisons link.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------