update cp_stock_check_detail set beginnum = 
(select endnum from cp_stock_check_detail a
where org='1795' and op_data='20050425' and a.org=org and a.goods=a.goods and
a.warehouse=warehouse) 
where  op_date='2005-04-26';