我有两个data sets,一个有一万多obs,一个有100个obs, 是个参考数据库 我想进行一对多merge, 问题是他们的coding是不同版本 key variable 是icode
第一个icode 四个数字, 第二个数据库icode三个数字,少了第一个零
我起先用substr,创建icode2,=subtr(icode, 2,3,) 但是numerical 好像不通 请各位指教 多谢
如果icode2 转成功, 再用merge icode=icode2
还有别的办法吗
The two exsisted datasets have their already generated code system.
The dataset1 code is 0123, 0125, 0156
相应y, the dataset 2 code is 123, 125, 156
they are just same, but becuase of different versions of coding system
i really just need to delete the dataset1 first zero so that I can merge, I need a multiple match merge
so the dataset 1 is a reference dataset with 100 obs, it explains all those meanings of 0123, 0125, 156 and their realted different cateogries
the dataset2 is a dataset with over 10,000 obs. then the expect merged datasets with have all those obs with different explaination
i need to remove 0 from the dataset1 so that I can merge