m*******g 发帖数: 3044 | 1 这一阵问了很多问题,得到大家很多帮助,感谢,现在有了新问题
我在SAS里用SQL的UNION ALL FUNCTION连接表.我的CODE:
proc sql;
create table sasuser.summary as
select * from sasuser.Lr_f0
order by client_type, month, health_pla
union all
select * from sasuser.Lr_c0
order by client_type, month, health_pla
union all
select * from sasuser.Lr_id0
order by client_type,month,health_pla;
quit;
给我显示的错误是
ERROR 22-322: Syntax error, expecting one of the following: ;, !, !!, &, (,
*, **, +, ',', -,
'.', /, <, <=, <>, =, >, >=, ?, AND, ASC, ASCENDING, BETWEEN,
CONTAINS, DESC,
DESCENDING, EQ, EQT, GE, GET, GT, GTT, IN, IS, LE, LET, LIKE,
LT, LTT, NE, NET,
NOT, NOTIN, OR, ^, ^=, |, ||, ~, ~=.
ERROR 76-322: Syntax error, statement will be ignored.
我标点符号错了吗? 我是要把三张表合成一张表.在ACCESS里,用这个CODE没问题,SAS里
就不知道了,SAS里该用什么CODE | R*********i 发帖数: 7643 | 2 Try removing the statement "order by client_type, month, health_pla" from
the frist two paragraphs? | i*****y 发帖数: 126 | 3 我不是高手。
试一下吧 order by 放最后。
proc sql;
create table sasuser.summary as
(select * from sasuser.Lr_f0
union all
select * from sasuser.Lr_c0
union all
select * from sasuser.Lr_id0
)
order by client_type,month,health_pla;
quit; | m*******g 发帖数: 3044 | 4 union function, no order by
I delete order by, it works |
|