0
我想根據從選擇statment值更新表invdtl列prtnum和revlvl,這裏是代碼如何根據選擇統計中的多個連接更新和設置值?
update invdtl set invdtl.prtnum = usr_prtmst_xref.prtnum,invdtl.revlvl =
usr_prtmst_xref.colnam ([select
invdtl.prtnum,usr_prtmst_xref.prtnum AS
crossref,invdtl.revlvl,aremst.arecod,aremst.fwiflg from invdtl
join usr_prtmst_xref
on usr_prtmst_xref.prtnum = usr_prtmst_xref.prtnum
join invsub
join invlod
join locmst
join aremst
on aremst.arecod = locmst.arecod
and aremst.wh_id = locmst.wh_id
on locmst.stoloc = invlod.stoloc
and locmst.wh_id = invlod.wh_id
on invlod.lodnum = invsub.lodnum
on invsub.subnum = invdtl.subnum where aremst.arecod = 'EXPR' or
aremst.fwiflg = '1' and rownum <2])
我想複製兩個值prtnum和revlvl由select語句返回,但有一些語法問題。
如果您有錯誤,請顯示您的確切錯誤信息 – scaisEdge
您正在使用哪個db? – scaisEdge
@scaisEdge錯誤是意想不到的令牌= –