【发布时间】:2016-08-13 04:16:39
【问题描述】:
我无法通过在我的数据步骤中调用宏来运行我的 PROC SQL 函数。 单独的 SQL 函数有效,但我需要让它为每个安全组运行。
%macro adding;
proc sql;
insert into have (Time,seconds) values
("9:10:00"t,33000);
insert into have (Time,seconds) values
("16:50:00"t,60600);
quit;
%mend;
data have;
set have;
by security;
if first.security then %adding;
if seconds=33000 then date=lag(date);
if seconds=60600 then date=lag(date);
run;
错误是:
1 过程 sql;插入有(时间,秒) 价值观
---- ------
180 180 180 180 1 ! ("9:10:00"t,33000); insert into have (Time,seconds) values 1 !("16:50:00"t,60600);放弃;错误 180-322:语句是 无效或使用顺序不正确。
我不知道要改什么才可以用...
感谢您的帮助!最好的
【问题讨论】: