錯誤:

1 update account_list
2 set PaidIn = select sum(Penalty) from pay_rec where CerID = '1006840113' and Processed = 0,
3 Way = '现金'
4 where PaidIn = 0.00;

 

正確:

1 update account_list a, 
2 (select sum(Penalty) as P from pay_rec where CerID = '1006840113' and Processed = 0 group by Processed) b
3 set a.PaidIn = b.P,
4 a.Way = '现金'
5 where a.BillID = '20120102160851';



相关文章:

  • 2021-11-09
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-07
  • 2021-12-05
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2021-10-09
  • 2021-10-31
  • 2022-12-23
  • 2021-08-04
  • 2021-12-23
相关资源
相似解决方案