【发布时间】:2022-01-07 02:24:10
【问题描述】:
我最近才开始使用 SAS。我正在尝试基于另一个表oldtable 创建一个新表newtable。
假设oldtable 包含变量OldPrice。我想使用基于OldPrice 计算的新变量NewPrice 创建newtable。然后过滤newtable,只显示大于10的NewPrice。
下面是我的示例代码。
data newtable;
set oldtable;
NewPrice = OldPrice * 2
where NewPrice > 10;
run;
但是,我收到错误消息,指出 NewPrice 不是 oldtable 的变量。
【问题讨论】: