rcs_his_rok.meterno = bs_book_cust.meterno and ,bs_book_cust 在哪?在另一个()里面.当然会出错.

解决方案 »

  1.   


    update rcs_his_rok
    set rcs_his_rok.cokflag = 'Y'where to_char(rcs_his_rok.readingdate, 'yyyymm') = '200507' and 
      to_char(rcs_his_rok.caldate, 'yyyymmdd') = '20050708'and 
    >  rcs_his_rok.meterno = bs_book_cust.meterno and    这行去掉即可!
      bs_book_cust.bookid = '10151' and   
      ....
      

  2.   

    我来改改:update rcs_his_rok a
    set    rcs_his_rok.cokflag = 'Y'
    where  to_char(rcs_his_rok.readingdate, 'yyyymm') = '200507' 
    and    to_char(rcs_his_rok.caldate, 'yyyymmdd') = '20050708'
    and    rcs_his_rok.meterno = bs_book_cust.meterno 
    and    exists
    (select 1
    from rcs_his_rok , bs_book_cust
    where to_char(rcs_his_rok.readingdate, 'yyyymm') = '200507' 
    and   to_char(rcs_his_rok.caldate, 'yyyymmdd') = '20050711'
    and   rcs_his_rok.meterno = bs_book_cust.meterno 
    and   rcs_his_rok.cokflag = 'Y' 
    and   bs_book_cust.bookid = '10151' 
    );
      

  3.   

    不必要那么复杂,按照我说的你试试,应该完活。
    ----------------------->
     回复人: licsth() ( ) 信誉:100  2005-07-14 18:13:00  得分: 0  
     
     
       
    update rcs_his_rok
    set rcs_his_rok.cokflag = 'Y'where to_char(rcs_his_rok.readingdate, 'yyyymm') = '200507' and 
      to_char(rcs_his_rok.caldate, 'yyyymmdd') = '20050708'and 
    >  rcs_his_rok.meterno = bs_book_cust.meterno and    这行去掉即可!
      bs_book_cust.bookid = '10151' and   
      ....