我的数据比较大,所以需要SAS来进行处理,但是初学SAS,请各位大神赐教!
有表一:
VAR1,VAR2,VAR3,VAR4,。。。,VAR20
有表二:
VAR1,VAR3,VAR4,VAR21,。。。,VAR50
现在需求按VAR1,VAR3,VAR4来合并表格
我的程序是
proc sql;
create tablethesis_1.newdata as
select *
from thesis.new_s thesis_1.new_10_s
wherethesis_1.new_s.VAR1=thesis_1.new_10_s.VAR1 andthesis_1.new_s.VAR3=thesis_1.new_10_s.VAR2 andthesis_1.new_s.VAR4=thesis_1.new_10_s.VAR3
order bythesis_1.new_s.VAR1 thesis_1.new_s.VAR3 thesis_1.new_s.VAR4;
quit;
出现错误是
2 proc sql;
3 create table thesis_1.newdata as
4 select *
5 from thesis_1.new_s thesis_1.new_10_s
-
22
200
ERROR 22-322: 语法错误,期望下列之一: ;, ',', ANSIMISS, CROSS, EXCEPT, FULL, GROUP, HAVING, INNER, INTERSECT, JOIN,
LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE.
ERROR 200-322: 该符号不可识别,将被忽略。
6 where thesis_1.new_s.VAR1=thesis_1.new_10_s.VAR1 and thesis_1.new_s.VAR3=thesis_1.new_10_s.VAR2 and
-
22
76
6 ! thesis_1.new_s.VAR4=thesis_1.new_10_s.VAR3
ERROR 22-322: 语法错误,期望下列之一: ;, !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, ?, AND, BETWEEN, CONTAINS, EQ,
EQT, EXCEPT, GE, GET, GROUP, GT, GTT, HAVING, IN, INTERSECT, IS, LE, LET, LIKE, LT, LTT, NE, NET, NOT,
NOTIN, OR, ORDER, OUTER, UNION, ^, ^=, |, ||, ~, ~=.
ERROR 76-322: 语法错误,语句将被忽略。
7 order by thesis_1.new_s.VAR1 thesis_1.new_s.VAR3 thesis_1.new_s.VAR4;
8 quit;
NOTE: 由于出错,SAS 系统停止处理该步。
NOTE: “PROCEDURE SQL”所用时间(总处理时间):
实际时间 0.07 秒
CPU 时间 0.04 秒