920240553 发表于 2014-7-14 14:28 
/*合并所有数据库,放在work逻辑库中*/
proc sql;
        create table control as
您好!我试了试,但是log报错了,不知怎么回事。
282  /*合并控制变量数据库,放在work逻辑库中*/
283  proc sql;
284  create table control as
285  select distinct
286  a.stkcd, a.accper,a.accperyy,
287  b.pay_top3,
288  c.shrcr1,c.shrcr3,
289  d.zongshizhi,
290  e.ind,  e.ind_2code,  e.baohu,  e.polution,
291  f.zichan,   f.fuzhai,
292  h.tobinq_a,  h.tobinq_b,  h.tobinq_c,  h.tobinq_d,  h.bm_1,  h.bm_2,
293  i.inc_oper,
294  j.zhouqi_a,  j.zhouqi_b,  j.zhouqi_c, j.gudongquanyizhouqi_a,  j.gudongquanyizhouqi_b,  j.gudongquanyizhouqi_c,
295  k.ocf,  k.fcf,
296  l.central_soe,  l.local_soe,  l.soe
297  from
298          cont.earning as a
299          union all
300          cont.gaoguanxinchou as b
             ----
             79
301          union all
             -----
             22
             76
ERROR 79-322: 期望“SELECT”。
ERROR 22-322: 语法错误,期望下列之一: 带引号的字符串, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN, LENGTH, TRANSCODE.
ERROR 76-322: 语法错误,语句将被忽略。
302          cont.guquanjizhong as c
303          union all
304          cont.shizhi as d
305          union all
306          cont.indcd_new as e
307          union all
308          cont.lev_size as f
309          union all
310          cont.listdt  as  g
311          union all
312          cont.tobinq as  h
313          union all
314          cont.inc_oper as i
315          union all
316          cont.zhouqi as j
317          union all
318          cont.fcf  as k
319          union all
320          cont.attri_ctrl  as l
321  on a.stkcd =b.stkcd =c.stkcd =d.stkcd=e.stkcd=f.stkcd=g.stkcd=h.stkcd  =i.stkcd  =j.stkcd =k.stkcd=l.stkcd
322  and   a.accper=b.reptdt=c.reptdt                =f.accper       =h.accper =i.accper =j.accper
323  and   a.accperyy=d.year=k.year=l.year
324  order by stkcd;
325  quit;
NOTE: 由于出错,SAS 系统停止处理该步。
NOTE: “PROCEDURE SQL”所用时间(总处理时间):
      实际时间          0.03 秒
      CPU 时间          0.03 秒