嗨,我想用其他表的列更新一列,做出一些决定这是我的代码
update STOCKS
set SE_QTY_L2 = (
select SE_QTY_L2
from STOCKS
join
VITEM on VITEM.Code= STOCKS.SE_ITEM_CODE
and SE_UNIT = VITEM.[First Unit] and VITEM.[Max Level] = 3
) from STOCKS
join
VITEM on VITEM.Code= STOCKS.SE_ITEM_CODE
and SE_UNIT = VITEM.[First Unit] and VITEM.[Max Level] = 3
当我运行此查询时,会引发以下错误:
错误
子查询返回超过 1 个值。当子查询跟随 =、!=、<、<=、>、>= 或子查询用作表达式时,这是不允许的