小弟有一个导表的语句,可是效果总不尽人意。
语句意思如下:
insert into table_temp (field1,field2,field3) select t.field1,t.field2,t.field3 from tableA a,tableB b 
where a.id in ('001','002','003'...) and a.totemp=0 and a.hao is not null and a.id=b.id and b.deleted=0请求高手指教一下,谢谢各位了。

解决方案 »

  1.   

    不好意思,刚才一着急,忘了说明问题出在哪了,其中的a.hao is not null 老是不起作用,数据导到table_temp后,还是有数据还是null值的,急死老夫了,各位给看看吧?老夫在线等!!!
      

  2.   

    用上tableA a,tableB b 之间的条件关联
      

  3.   

    有用上呀,a.id=b.id
    原本的SQL句子很复杂,这里就暂且用这个简单的例子说明一下吧
      

  4.   

    是不是不是NULL   有空格存在呀
      

  5.   

    insert into table_temp (field1,field2,field3) select t.field1,t.field2,t.field3 from tableA a,tableB b
    where a.id in ('001','002','003'...) and a.totemp=0 and nvl(a.hao,'')<>'' and a.id=b.id and b.deleted=0