update table1 set field1 = '111',field2 = '222' 
    from (select table1.f1, table1.field3 from table1, table3 
    where table1.f1 = table3.fd2 
    and table1.ToCaculateFlag = 1 and table3.fd1 = '333')
    as table2 ,table1
  where table2.f1 = table1.f1 and table2.field3 = table1.field3;

解决方案 »

  1.   

    plsql语法
    不支持 update ...from...
      

  2.   

    update table1 set field1 = '111',field2 = '222' 
    where exists (select 1 from table3 
        where table1.f1 = table3.fd2 
        and table1.ToCaculateFlag = 1 and table3.fd1 = '333'
    )
      

  3.   

    不好意思,发错了,原句是这样的update table1 set field1 = table2.f3,field2 = table2.f4
        from (select table1.f1, table1.field3, from table1, table3 
        where table1.f1 = table3.fd2 
        and table1.ToCaculateFlag = 1 and table3.fd1 = '333')
        as table2 
      where table2.f1 = table1.f1 and table2.field3 = table1.field3
      

  4.   

    你这语句字段也对不上啊
    update table1 set (field1,field2)=(select ... from ...) where exists(select 1 from ...)
    自己改吧