DBMS/COPY FAQ
Why do some of the numeric variables became character variables when I convert a spreadsheet into SAS, SPSS, Minitab, etc.?
A spreadsheet can have numeric values and
character values in one column, a variable in a statics software is either
numeric or character type. So, when converting a spreadsheet DBMS/COPY
has to assign the variable type of a data column.
If there is just one character in a column, like a blank in a cell you
wanted to mark as empty, DBMS/COPY assignes the variable resulting from this
column the type Character.
To avoid this problem,
make sure that you only type numbers in a column of a numeric variable.
Don't type anything in cells with missing values, just skip them.
If you work with a big spreadsheet, it is hard to figure out, which cell causes
the type Character in your variable.
To convert the variable type:
SAS
VAR_CHAR be a variable of type
character in the dataset OLD, we want to convert it into a numeric
variable VAR_NUM
DATA new;
SET old;
VAR_NUM=0;
VAR_NUM=VAR_CHAR;
RUN:
The LOG window displays some error message for those values
of VAR_CHAR which were non-numeric, like the blank. Just ignore it.
SPSS for Windows
- Select
Transform > Compute Variable
As Target Variable define a new variable. in Numeric Expression writeNUMBER(VAR_CHAR,f8)
![]() | ![]() | ©2007 Yale
University Social Science Statistical Laboratory Certifying Authority: Themba Flowers lm: Wed Apr 09 15:45:19 EDT 2003 |


