Best practice for data migration

时间:2017-04-10 03:11:23

标签: sql migration data-migration

Currently We have developed a system for a manual work they have been doing using many excel files.

Is there a best practice for data migration? because I wanted to use backend language like .net to do the validation and insert into tables rather than using SQL to do migration.

Total record in excel is around 12K rows but for many tables so its not needed consider a lot about performance and it is only one time.

1 个答案:

答案 0 :(得分:0)

我会在Excel中添加一些生成SQL插入/更新脚本的计算列。像="INSERT INTO table (column) VALUES ('"&A1&"');"

这样的东西

然后只需复制计算列并通过SQL客户端运行它。我曾经有一个宏直接从Excel通过OLEDB运行它,它会突出显示失败的表达式并在它们旁边存储SQL异常。

这样可以根据需要轻松整理,纠正和重新运行数据。