delete operatorlist from mom30100_bak,任务分配表 
where 任务分配表.任务号 =mom30100_bak.rwh and 任务分配表.工装号 = mom30100_bak.gzh and operatorlist.no = mom30100_bak.no and
      convert(datetime,convert(char(10),生产完工时间,120)) >=@sdt and convert(datetime,convert(char(10),生产完工时间,120)) <=@edt and (生产完工标识='1' or  取消标识='1')
这个语句在ORACLE中如何实现

解决方案 »

  1.   

    其它都一样,时间转换改一下  用to_date  
      

  2.   

    delete operatorlist 
    where exists (select 1 from  mom30100_bak,任务分配表
    where 任务分配表.任务号 =mom30100_bak.rwh and 任务分配表.工装号 = mom30100_bak.gzh and operatorlist.no = mom30100_bak.no and
      to_date(to_char(生产完工时间,'yyyy-mm-dd'),'yyyy-mm-dd') >=sdt and to_date(to_char(生产完工时间,'yyyy-mm-dd'),'yyyy-mm-dd') <=edt and (生产完工标识='1' or 取消标识='1'))
      

  3.   

    oracle的时间可以直接做大小对比的