country import 2000 2001 2002
A A 12 234 343
B B 23 343 34
转换成
country import time sells
A A 2000 12
A A 2001 234
A A 2002 343
B B 2000 23
B B 2001 343
B B 2002 34
有什么技巧可以弄吗? 实际上后面的时间项,多达1000个项。
请教各位帮忙啊。感激不尽~~附件以上传
data final;
set yourDset;
array _date{*} _:;
do i = 1 to dim(_date);
time = substrn(_date, 2);
sells = _date;
output;
end;
keep country import time sells;
run;