Troubleshooting
Problem
I have a numeric variable called 'old,' which I copied to a new column of data in my Data Editor. I then went to Variable View and changed the type from Numeric to String, then renamed this variable to 'temp.' Everything looks fine in the Data View screen. I then use the substring function in SPSS to compute a new variable, 'new,' based on the string variable, 'temp'. My syntax is shown below: STRING new (A4). COMPUTE new = SUBSTR(temp, 1). EXE. When I run the above commands, I get the error below: >Error # 4309 in column 256. Text: (End of Command) >Invalid combination of data types in an assignment. Character strings may >only be assigned to string variables. Numeric and logical quantities may >only be assigned to numeric variables. Consider using the STRING or NUMBER >function. >This command not executed. What is wrong?
Log InLog in to view more of this document
Historical Number
20032
Was this topic helpful?
Document Information
Modified date:
16 April 2020
UID
swg21476729