0
我使用SAS Enterprise Guide中,想比较两个日期变量:比较在SAS两个日期变量在PROC SQL WHERE子句
我的代码如下:
proc sql;
CREATE TABLE observations_last_month AS
SELECT del_flag_1,
gross_exposure_fx,
reporting_date format=date7.,
max(reporting_date) AS max_date format=date7.
FROM &dataIn.
WHERE reporting_date = max_date;
quit;
如果我跑我的没有WHERE
声明,我得到了以下数据代码:
然而,当我运行上面的代码我得到的以下错误消息:
ERROR: Expression using (=) has components that are of different data types.
ERROR: The following tables were not found in the contributing tables: max_date.
我在做什么错在这里?前面的帮助
非常感谢!这工作像一个魅力。 – MRR