`
sylinx_yqg
  • 浏览: 140069 次
  • 性别: Icon_minigender_1
  • 来自: 福建 漳州
社区版块
存档分类
最新评论

一个表更新另一个表

 
阅读更多
UPDATE rs
SET 转正时间 =
          (SELECT TOP 1 zz.转正时间
         FROM zz
         WHERE zz.序号 = rs.管理号)


update design_file set type = '物料' where type is NULL or type=''



update stock_cell inner join design_file on stock_cell.product_id = design_file.product_id set stock_cell.first_kind_ID=design_file.first_kind_ID,stock_cell.first_kind_name=design_file.first_kind_name,stock_cell.second_kind_ID=design_file.second_kind_ID,stock_cell.second_kind_name=design_file.second_kind_name,stock_cell.third_kind_ID=design_file.third_kind_ID,stock_cell.third_kind_name=design_file.third_kind_name,stock_cell.product_name=design_file.product_name,stock_cell.type=design_file.type



update stock_balance inner join design_file on stock_balance.product_id = design_file.product_id set stock_balance.first_kind_ID=design_file.first_kind_ID,stock_balance.first_kind_name=design_file.first_kind_name,stock_balance.second_kind_ID=design_file.second_kind_ID,stock_balance.second_kind_name=design_file.second_kind_name,stock_balance.third_kind_ID=design_file.third_kind_ID,stock_balance.third_kind_name=design_file.third_kind_name,stock_balance.product_name=design_file.product_name,stock_balance.type=design_file.type


update stock_balance_details inner join design_file on stock_balance_details.product_id = design_file.product_id set stock_balance_details.first_kind_ID=design_file.first_kind_ID,stock_balance_details.first_kind_name=design_file.first_kind_name,stock_balance_details.second_kind_ID=design_file.second_kind_ID,stock_balance_details.second_kind_name=design_file.second_kind_name,stock_balance_details.third_kind_ID=design_file.third_kind_ID,stock_balance_details.third_kind_name=design_file.third_kind_name,stock_balance_details.product_name=design_file.product_name,stock_balance_details.type=design_file.type


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics