update bj set 数据1=你的源表.数据1 from 你的源表 where 你的源表.rdate=bj.rdateinsert bj (数据1,数据2) select 数据1,数据2 from 你的源表 where rDate not in (select rdate from bj)

解决方案 »

  1.   


    insert into bj (col1,col2.........) select col1,col2......... from other_tableName where rDate not in (select rDate from bj)
    update bj set col1=a.col1,col2=a.col2,........ from bj b join other_tableName a on a.rDate=b.rDate
      

  2.   

    or update bj set col1=a.col1,col2=a.col2,........ from bj b,other_tableName a where a.rDate=b.rDate