你的update 语法本身就是错的.

解决方案 »

  1.   

    可是我在MS SQL SERVER下能执行成功哦?WHY?
      

  2.   

    update user_hcdetail a,  
      user_hcdetail   b,  
      cpcshtins   c,  
      cpcwf    d,  
      cpcwfproc_v   e
    set a.pno='200610100001'   楼主的from 是多余
      

  3.   

    sten(近视进士)的意思是这样?update user_hcdetail a,   
      user_hcdetail   b,  
      cpcshtins   c,  
      cpcwf    d,  
      cpcwfproc_v   e
        set a.pno='200610100001'
      Where  
            b.shtinsid = c.shtinsid  
      and   c.wfid=d.wfid  
      and   d.wfid=e.wfid  
      and   d.currprocid=e.procid  
      and   e.procid=6  
      and   (length(rtrim(ltrim(b.pno)))<1 or b.pno is NULL)还是报错哦,说没有SET。
    SORRY,偶是菜鸟
      

  4.   

    update user_hcdetail a set a.pno='200610100001'
    where exists(select 1 from user_hcdetail   b,  
      cpcshtins   c,  
      cpcwf    d,  
      cpcwfproc_v   e
    Where  
            b.shtinsid = c.shtinsid  
      and   c.wfid=d.wfid  
      and   d.wfid=e.wfid  
      and   d.currprocid=e.procid  
      and   e.procid=6  
      and   (length(rtrim(ltrim(b.pno)))<1 or b.pno is NULL))
    试试这个
      

  5.   

    To近视进士 语句检查通过了,但结果不对哦
    单独执行:
    select 1 from user_hcdetail   b,  
      cpcshtins   c,  
      cpcwf    d,  
      cpcwfproc_v   e
    Where  
            b.shtinsid = c.shtinsid  
      and   c.wfid=d.wfid  
      and   d.wfid=e.wfid  
      and   d.currprocid=e.procid  
      and   e.procid=6  
      and   (length(rtrim(ltrim(b.pno)))<1 or b.pno is NULL)
    的记录数有131条,是对的,
    但UPDATE:
    update user_hcdetail a set a.pno='200610100001'
    where exists(select 1 from user_hcdetail   b,  
      cpcshtins   c,  
      cpcwf    d,  
      cpcwfproc_v   e
    Where  
            b.shtinsid = c.shtinsid  
      and   c.wfid=d.wfid  
      and   d.wfid=e.wfid  
      and   d.currprocid=e.procid  
      and   e.procid=6  
      and   (length(rtrim(ltrim(b.pno)))<1 or b.pno is NULL))
    确更新了2000多条记录,把length(rtrim(ltrim(b.pno)))>1 的记录都更新了 :(
      

  6.   

    update user_hcdetail b set b.pno='200610100001'
    where exists(select 1 from   
      cpcshtins   c,  
      cpcwf    d,  
      cpcwfproc_v   e
    Where  
            b.shtinsid = c.shtinsid  
      and   c.wfid=d.wfid  
      and   d.wfid=e.wfid  
      and   d.currprocid=e.procid  
      and   e.procid=6  
      and   (length(rtrim(ltrim(b.pno)))<1 or b.pno is NULL))try this!
      

  7.   

    Eric_1999(╙@^@╜) 那个应该没什么问题!