麻烦大家帮我看一下这个sql语句为什么不对。
update
(select stom.qty qty ,std.stocktaking_qty stocktaking_qty
from stocktaking_master stm,stocktaking_detail std ,storage_master stom
where stm.stocktaking_no = '10000000000001 ' and std.stocktaking_no = stm.stocktaking_no
and stom.warehouse_no = stm.warehouse_no and stom.product_no = std.product_no and
stom.lot_no = std.lot_no
)
set qty = stocktaking_qty
update
(select stom.qty qty ,std.stocktaking_qty stocktaking_qty
from stocktaking_master stm,stocktaking_detail std ,storage_master stom
where stm.stocktaking_no = '10000000000001 ' and std.stocktaking_no = stm.stocktaking_no
and stom.warehouse_no = stm.warehouse_no and stom.product_no = std.product_no and
stom.lot_no = std.lot_no
)
set qty = stocktaking_qty
set qty = (select std.stocktaking_qty
from stocktaking_master stm, stocktaking_detail std
where stm.stocktaking_no = '10000000000001 '
and std.stocktaking_no = stm.stocktaking_no
and stom.warehouse_no = stm.warehouse_no
and stom.product_no = std.product_no
and stom.lot_no = std.lot_no
and rownum < 2)
set qty = (select std.stocktaking_qty
from stocktaking_master stm, stocktaking_detail std
where stm.stocktaking_no = '10000000000001 '
and std.stocktaking_no = stm.stocktaking_no
and stom.warehouse_no = stm.warehouse_no
and stom.product_no = std.product_no
and stom.lot_no = std.lot_no
and rownum < 2)
where exists (select 1
from stocktaking_master stm, stocktaking_detail std
where stm.stocktaking_no = '10000000000001 '
and std.stocktaking_no = stm.stocktaking_no
and stom.warehouse_no = stm.warehouse_no
and stom.product_no = std.product_no
and stom.lot_no = std.lot_no)