MSSQL 舊資料表A_t_trx_time_sheet灌到新資料表B_t_trx_timesheet

INSERT INTO dbo.t_trx_timesheet 
([form_id]
      ,[work_date_start]
      ,[work_date_end]
      ,[operator_no]
      ,[work_hour_start]
      ,[work_minute_start]
      ,[work_hour_end]
      ,[work_minute_end]
      ,[work_hour]
      ,[non_operating_hour]
      ,[equipment_id]
      ,[material_id]
      ,[efficiency]
      ,[process_qty]
      ,[eligibility_qty]
      ,[proirerror_qty]
      ,[sandhole_qty]
      ,[black_qty]
      ,[lessmeat_qty]
      ,[dirty_qty]
      ,[impurities_qty]
      ,[currenterror_qty]
      ,[pressrub_qty]
      ,[size_ng_qty]
      ,[duandao_qty]
      ,[takeplace_qty]
      ,[remark]
      ,[enabled]
      ,[created_by]
      ,[creation_date]
      ,[last_updated_by]
      ,[last_update_date]
      ,[operator_name]
      ,[equipment_name]
      ,[material_name]
      ,[plan_qty]
      ,[other_desc]
      ,[class_yield]
      ,[rest_time]
      ,[non_operation_hour1]
      ,[non_operation_hour2]
      ,[non_operation_hour3]
      ,[non_operation_hour4]
      ,[non_operation_hour5]
)
SELECT 
    [form_id]
      ,[work_date_start]
      ,[work_date_end]
      ,[operator_no]
      ,[work_hour_start]
      ,[work_minute_start]
      ,[work_hour_end]
      ,[work_minute_end]
      ,[work_hour]
      ,[non_operating_hour]
      ,[equipment_id]
      ,[material_id]
      ,[efficiency]
      ,[process_qty]
      ,[eligibility_qty]
      ,[proirerror_qty]
      ,[sandhole_qty]
      ,[black_qty]
      ,[lessmeat_qty]
      ,[dirty_qty]
      ,[impurities_qty]
      ,[currenterror_qty]
      ,[pressrub_qty]
      ,[size_ng_qty]
      ,[duandao_qty]
      ,[takeplace_qty]
      ,[remark]
      ,[enabled]
      ,[created_by]
      ,[creation_date]
      ,[last_updated_by]
      ,[last_update_date]
      ,[operator_name]
      ,[equipment_name]
      ,[material_name]
      ,[plan_qty]
      ,[other_desc]
      ,[class_yield]
      ,[rest_time]      
      ,0
      ,0
      ,0
      ,0
      ,0
FROM dbo.t_trx_time_sheet;

← 回列表