SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Search||next

Transforming Data with SAS Functions
Modifying Character Values with Functions
 


Question: Sample values of two variables appear below. Which function should be used to extract the highlighted numeric substring from each variable?
 


     ShippingCode        SiteManager
     TR112K_T             Montry,75
     TD107M_R             Lee,124
The SUBSTR function should extract values from ShippingCode and the SCAN function should extract values from SiteManager.
 
The SCAN function should extract values from ShippingCode and the SUBSTR function should extract values from SiteManager.


 
  ||next

 

Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement