09-22-2016 04:34 AM
One column contains numeric and character. I want to split this to two columns.
1234567 - Romana
The number is a registernumber and the name is the name of the registergood.
I want two columns.
Reg.nr. and name
09-22-2016 04:50 AM
To split the string, use the scan() function, and then you can further process the parts:
data want; set have; numvar = input(scan(oldvar,1,'-'),best.); length namevar $20; * use sufficient length here; namevar = strip(scan(oldvar,2,'-')); * strip removes blanks; run;