if not exists(select 1 from ta a right join tb on a.id = b.id where a.send is not null )
    insert into #send_Miss ........

解决方案 »

  1.   

    啊喔 。晕死 。 我少写了 not 我就说怎么老不对 ,。 
      

  2.   

    能写全吗?
    insert into 后面的。 我只要 a表里 id 和 send列的值。我写的还是不对 
    谢谢另外我想先统计下,因为我是每天检查,如果当天有这样的数据,就执行该语句,没有则不执行。
      

  3.   

    insert into #send_Miss select a.id , a.send from A,B where a.id = b.id and b.send is not null --不知道条件对不对,自己更改.