07-16-2015 12:15 PM
I'm trying to get all of the codes starting from 394.0-397.1 in the data step. these numbers in a character format.
where code in ('394.0' -'397.1');
Thanks for your help in advance.
07-16-2015 01:17 PM
You can't do a WHERE statement on a new, created variable in the same data step, as the where statement happens before the data enters the PDV. Try the following instead:
input Code $;
If 394<=Code_n<=397.1 then output;
07-16-2015 01:25 PM
SAS will still read the characters as numbers if you are using number operators and SAS can translate it correctly. You do not need to change the format:
Need further help from the community? Please ask a new question.