insert into 原表(字段...)
select 字段... from 新表

解决方案 »

  1.   

    字段转移有对应关系吗?
    或者两表都加自增列,根据自增列对应再update
      

  2.   

    就用insert into select
    对好字段,处理好新老字段类型和长度的关系
      

  3.   

    将新表中的数据按老表对应的顺序bcp出来
    EXEC master..xp_cmdshell 'bcp "select id1,id2,id3 from test.dbo.newtable" queryout e:\test.txt -c -U"sa" -P"pwd" -t","'
    同样把oldtable的也导出来,放到excel中对齐列,再次保存为txt格式.再导进老表中
    EXEC master..xp_cmdshell 'bcp test.dbo.oldtable in e:\test.txt -c -q  -U "sa" -P "pwd" -t"|"'