C**********o 发帖数: 658 | 1 Case:
I have 107 variables to be renamed. Can I do it in this way (SAS) --
proc select xxx,xxx,xxx, ...., xxx
as xxxnew1,xxxxnew2,xxxnew3,....,xxxnew107
?
Or do I have to rename them one by one, such as
Proc select xxx as xxxnew11, xxx as xxxnew2,... ?? | q****p 发帖数: 462 | | s*******o 发帖数: 194 | 3 RENAME COL1-COL5=NEW1-NEW5; | C**********o 发帖数: 658 | 4 Thanks! I will try!
Yes. Select oldName as newname. | C**********o 发帖数: 658 | 5 Thank you. I end up copying the old and new variables in excel, then add a '
=' between them, then copy it into notepad, then copy it into SAS. | w*********m 发帖数: 4740 | 6 write python(or other language) code to output such a sql script, and run
the sql script
【在 C**********o 的大作中提到】 : Case: : I have 107 variables to be renamed. Can I do it in this way (SAS) -- : proc select xxx,xxx,xxx, ...., xxx : as xxxnew1,xxxxnew2,xxxnew3,....,xxxnew107 : ? : Or do I have to rename them one by one, such as : Proc select xxx as xxxnew11, xxx as xxxnew2,... ??
| C**********o 发帖数: 658 | 7 水平有限,不会那么高深的东西。
不过我用excel + notepad 也很快。 |
|