selcet target from r_c_e_h20111205 t where call_type='1' not in (selcet call_number from d_areacfg);
请问下这句话有什么错误。这句话就是说在r_c里面找在d_里面没有的数据;

解决方案 »

  1.   

    少了and,并且改用exists
    selcet target from r_c_e_h20111205 t 
    where call_type='1' and not exists (selcet call_number from d_areacfg);
      

  2.   


     where call_type='1'  and  xxxx not in (selcet call_number from d_areacfg);
      

  3.   

    3楼的也对。
    如果用not in,前面就必须加上字段名;
    如果用not exists,前面不用加字段名、
      

  4.   


    偶感觉关键是楼主少了个字段名,就是用哪个字段的值与d_areacfg中比较呢。如果按1楼的写法是不符合楼主需求的,合用exists也需要加上where条件才对。
      

  5.   

    and not in  需要指定什么内容 not in啊