I have a variable name "WCO7023" (character type) receiving 3 types of results: 4-digit number, 3-digit number, and NA
For example
4412
4564
334
NA
7677
What I want is to get the first 3 digit as below
441
456
334
.
767
Could you please let me know how to make it? I think of generate a new variable named "SIC3" which is numeric type but I am not sure how to make it.
Warm regards.
For example
4412
4564
334
NA
7677
What I want is to get the first 3 digit as below
441
456
334
.
767
Could you please let me know how to make it? I think of generate a new variable named "SIC3" which is numeric type but I am not sure how to make it.
Warm regards.
Comment