是这样的,我已经使用select 连接多表取得想要更新的记录集,共有139条记录,FAssGrpID值都是'ZZW0XxLMQjqiyV/6c9PO2kGKbLs='
现在想在这查出的139条记录中更新 FAssGrpID值为其它值,应该怎么写语句呢??求助呀~~select tgv.fid,tgv.fbookeddate,tgv.fnumber,tgve.flocalamount,tgve.fid,tgve.faccountid,tgvar.fid,tgvar.fentryid,tgvar.fassgrpid,tgvar.fbillid from T_GL_VoucherAssistRecord tgvar, T_GL_Voucher tgv,T_GL_VoucherEntry tgve where tgvar.FAssGrpID='ZZW0XxLMQjqiyV/6c9PO2kGKbLs='
and tgvar.fbillid=tgv.fid and tgv.fcompanyid='X6LYi/UfSGuuUA9ZNwxJasznrtQ='
and tgvar.fentryid=tgve.fid and tgve.faccountid='TIwPYRKyRUy4gNse9h1Z+p2pmCY=' order by fbookeddate
现在想在这查出的139条记录中更新 FAssGrpID值为其它值,应该怎么写语句呢??求助呀~~select tgv.fid,tgv.fbookeddate,tgv.fnumber,tgve.flocalamount,tgve.fid,tgve.faccountid,tgvar.fid,tgvar.fentryid,tgvar.fassgrpid,tgvar.fbillid from T_GL_VoucherAssistRecord tgvar, T_GL_Voucher tgv,T_GL_VoucherEntry tgve where tgvar.FAssGrpID='ZZW0XxLMQjqiyV/6c9PO2kGKbLs='
and tgvar.fbillid=tgv.fid and tgv.fcompanyid='X6LYi/UfSGuuUA9ZNwxJasznrtQ='
and tgvar.fentryid=tgve.fid and tgve.faccountid='TIwPYRKyRUy4gNse9h1Z+p2pmCY=' order by fbookeddate
update T_GL_VoucherAssistRecord
set fassgrpid=你要更新的值
from T_GL_VoucherAssistRecord tgvar, T_GL_Voucher tgv,T_GL_VoucherEntry tgve where tgvar.FAssGrpID='ZZW0XxLMQjqiyV/6c9PO2kGKbLs='
and tgvar.fbillid=tgv.fid and tgv.fcompanyid='X6LYi/UfSGuuUA9ZNwxJasznrtQ='
and tgvar.fentryid=tgve.fid and tgve.faccountid='TIwPYRKyRUy4gNse9h1Z+p2pmCY='
and tgvar.fbillid=tgv.fid and tgv.fcompanyid='X6LYi/UfSGuuUA9ZNwxJasznrtQ='
and tgvar.fentryid=tgve.fid and tgve.faccountid='TIwPYRKyRUy4gNse9h1Z+p2pmCY='
tgv
set
faccountid=其他值
from
T_GL_VoucherAssistRecord tgvar, T_GL_Voucher tgv,T_GL_VoucherEntry tgve
where
tgvar.FAssGrpID='ZZW0XxLMQjqiyV/6c9PO2kGKbLs='
and
tgvar.fbillid=tgv.fid and tgv.fcompanyid='X6LYi/UfSGuuUA9ZNwxJasznrtQ='
and
tgvar.fentryid=tgve.fid and tgve.faccountid='TIwPYRKyRUy4gNse9h1Z+p2pmCY='
update tgvar set FAssGrpID='更新的值' from T_GL_VoucherAssistRecord tgvar, T_GL_Voucher tgv,T_GL_VoucherEntry tgve where tgvar.FAssGrpID='ZZW0XxLMQjqiyV/6c9PO2kGKbLs='
and tgvar.fbillid=tgv.fid and tgv.fcompanyid='X6LYi/UfSGuuUA9ZNwxJasznrtQ='
and tgvar.fentryid=tgve.fid and tgve.faccountid='TIwPYRKyRUy4gNse9h1Z+p2pmCY=' order by fbookeddate