1

This might be a dumb question, but I have a data flow task, OLE DB Source and Flat File Destination.

In my OLE DB Source I'd like to have an UPDATE statement, and then a SELECT. When I do that, I don't seem to get any rows written to my Flat File. I'm doing this, by the way, to help ensure that my update does not happen if my select fails. (I was going to put the two statements between a BEGIN TRAN and COMMIT.)

Unfortunately I can't use SSIS transactions because the server the SSIS is running on doesn't have the DTC service running.

4

2 回答 2

0

你必须更新你的控制流。

使用更新命令添加执行 SQL 任务,将绿色箭头从任务拖到数据流组件,在数据流中,您将拥有 oleDBSource 和平面文件目标

于 2012-04-14T17:34:32.720 回答
0

假设您想要的顺序是 SELECT -> UPDATE -> WRITE_TO_FLAT_FILE,请使用您的 OLE DB 源进行选择,然后使用 OLE DB 命令进行更新。最后,使用您的平面文件目标将数据写出。

在 OLE DB 源中,将错误输出设置为“失败组件”或“重定向行”;任何一个都可以让您避免后续的更新命令。

于 2012-04-13T22:11:16.580 回答