SSIS 包 xml 目标 [英] SSIS package xml destination

查看:38
本文介绍了SSIS 包 xml 目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 SSIS 包,可以从数据库中获取某种数据并将其放入 xml 文件目标中.它在 foreach 循环下工作.当每个循环执行时,数据在目标文件中更新.目前,数据在每个循环中都被覆盖.我真的想追加数据.

I have an SSIS package to get some sort of data from database and put it into an xml file destination. It is working under a foreach loop. While each loop is executing, the data is updated in the destination file. Currently the data is overwriting at each loop. Really I want to append the data.

推荐答案

首先将您的 XML 包装在 VARCHAR(MAX) 中并按照以下方式输出到平面文件目标:http://schottsql.blogspot.com.au/2009/10/ssis-and-xml-output.html

First wrap your XML in a VARCHAR(MAX) and output to a Flat File Destination as per: http://schottsql.blogspot.com.au/2009/10/ssis-and-xml-output.html

然后编辑您的平面文件目标并取消选中覆盖文件中的数据"选项.每个循环都会附加到平面文件中.

Then edit your Flat File Destination and uncheck the "Overwrite data in the file" option. Each loop will append to the Flat file.

这篇关于SSIS 包 xml 目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆