LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Oct 2008 14:01:05 -0700
Reply-To:     Akshaya <akshaya.nathilvar@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Akshaya <akshaya.nathilvar@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: how to clean characters from number data
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

In addition to Jack's solution, this can be done using TRANWRD or TRANSLATE functions, here's how:

Data have; input weight $; new_wt=input(tranwrd(weight,'kg',''),best8.); new_wt1=input(translate(weight,'','kg'),best8.); cards; 112 130kg 100 kg ;

Thanks! Akshaya


Back to: Top of message | Previous page | Main SAS-L page