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 (September 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 15 Sep 2009 06:51:09 -0700
Reply-To:     RolandRB <rolandberry@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         RolandRB <rolandberry@HOTMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Finding first numeric in a text and taking into another
              column:
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On 15 Sep., 08:38, shashi <shashi2...@gmail.com> wrote: > Finding first numeric in a text and taking into another column: > > Can anybody suggest how to find the first numeric of a column and > taking into another column? > > The text looks like: > > A5apple7 > cc8mango > 10pomegranate > > First numerics in the above text column should be taken into another > column like: > > 5 > 8 > 10 > > Any help will be much appreciated. > > Thanks, > Shashi

This is converting it into a sas numeric.

data _null_; str="A5apple7"; num=input(scan(translate(str," ",compress(str,"0123456789")),1," "), 6.); put num=; run;


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