Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用SSIS删除和添加页眉和页脚以进行读写 创建表项 ( 产品varchar(10), 客户varchar(10), 存储varchar(10) )_Ssis_Ssis 2012_Ssis 2008 - Fatal编程技术网

使用SSIS删除和添加页眉和页脚以进行读写 创建表项 ( 产品varchar(10), 客户varchar(10), 存储varchar(10) )

使用SSIS删除和添加页眉和页脚以进行读写 创建表项 ( 产品varchar(10), 客户varchar(10), 存储varchar(10) ),ssis,ssis-2012,ssis-2008,Ssis,Ssis 2012,Ssis 2008,问题1:我必须使用SSIS并从上表中生成以下格式的items.txt文件。第一行是硬编码值“Header | Items”,尾部是trail | Recordcount:+records count 问题2:我必须使用SSIS读取以下格式的items.txt文件,并仅将详细记录加载到上面的items表中 第1行:标题|项 第2行:ProductData1 | CustomerData1 | StoreData1 第3行:ProductData2 | CustomerData2 | StoreDa

问题1:我必须使用SSIS并从上表中生成以下格式的items.txt文件。第一行是硬编码值“Header | Items”,尾部是trail | Recordcount:+records count

问题2:我必须使用SSIS读取以下格式的items.txt文件,并仅将详细记录加载到上面的items表中

第1行:标题|项

第2行:ProductData1 | CustomerData1 | StoreData1

第3行:ProductData2 | CustomerData2 | StoreData2

第4行:拖车|记录计数:2


我必须使用上述示例中提到的相同文件格式,不允许更改文件格式。

我建议使用c#完成此任务,因为您需要额外的页眉和页脚。加载到reader.loop thru reader中,如果是第1行,则添加页眉,写出详细信息,如果是row=reader.Length,则写出尾部。也许您可以使用li如果我们在页眉(1)细节(2)和尾部(2)中有不同数量的列,那么下面的答案@Nicolases可以解决问题。我的意思是,我不关心页眉和页脚模式,只会将细节记录加载到表中。