02-21-2014 06:50 PM
I am looking for some assistance. I have a character field variable that contains data with both text and numbers. I am looking to change the data that is text into number zero and keep the text that looks like numbers and convert to number for further calculation/analysis. Is there a way to do this? Any help would be greatly appreciated.
02-21-2014 07:55 PM
Create a new variable from the old variable.
Example: Create NUMBER from ALPHA.
data want ;
set have ;
number = input(alpha,??20.);
if number = . then number = 0;