我正在以下格式和顺序的 Excel 文件中获取订单信息。我需要将这些加载到下表中。
OrderHeader
-----------
OrderNumber
CustomerID
Customer
--------
CustomerID
CustomerFirstName
CustomerLastName
OrderDetail
-----------
Product Information
在 C# 中,我曾经通过一次读取一行数据并检查 ordernumber 并循环遍历其余信息(如果与前一行保持相同)来加载它。现在我正在尝试迁移到 SSIS,并且想知道是否有更好的方法可以使用,或者我应该使用脚本任务。
OrderNumber CustomerID CustomerFirstName CustomerLastName Product ID Model No Serial No Date of Purchase
----------- ---------- ----------------- ---------------- ---------- -------- --------- ----------------
000001 A1 John Doe 111 1x1x1x 1s1s1s 11/1/2012
000001 A1 John Doe 112 1x1x2x 1s1s2s 11/1/2012
000001 A1 John Doe 113 1x1x3x 1s1s3s 11/1/2012
000001 A1 John Doe 114 1x1x4x 1s1s4s 11/1/2012
000001 A1 John Doe 115 1x1x5x 1s1s5s 11/1/2012
000001 A1 John Doe 116 1x1x6x 1s1s6s 11/1/2012
000002 A2 John1 Doe1 111 1x1x1x 1s1s1s 11/1/2012
000002 A2 John1 Doe1 112 1x1x2x 1s1s2s 11/1/2012
000002 A2 John1 Doe1 113 1x1x3x 1s1s3s 11/1/2012
000002 A2 John1 Doe1 114 1x1x4x 1s1s4s 11/1/2012
000002 A2 John1 Doe1 115 1x1x5x 1s1s5s 11/1/2012
000002 A2 John1 Doe1 116 1x1x6x 1s1s6s 11/1/2012