update arGoodsMt set
jiesje+(select sum(jiesje) from arGoodsDt c where
arGoodsMt.billno=c.billno), issettle=case when(select count(*)
='N')=0 then 'Y'else'N'end ptaxamount =(select
sum(d.ptaxamount)from arGoodsDt d where arGoodsMt.billno=
d.billno)where billno in(select rfbillno from SettleDt where billno=''1763)parameters:[]
//很明显,你上面的语句直接就是错的,我更改了下,其实就是一个更新的语句,筛选arGoodsMt表中满足在指定billno范围的记录,并对这些记录中的jiesje,issettle,ptaxamount三个字段的值进行更新,其中jiesje赋值为和当前记录billno相同的jiesje累计值,issettle赋值为满足总条件的总记录条数大于0的话'Y',否则为'N',ptaxamount:赋值为和当前记录billno相同的ptaxamount累计值
update arGoodsMt set
jiesje=(select sum(jiesje) from arGoodsDt c wherearGoodsMt.billno=c.billno),
issettle=case when(select count(*) from 某个表 where 字段='N')=0 then 'Y'else'N'end ,
ptaxamount =(select sum(d.ptaxamount)from arGoodsDt d where arGoodsMt.billno=d.billno)
where billno in(select rfbillno from SettleDt where billno=''1763)