O'Reilly logo

Microsoft SQL Server 2012 Integration Services: An Expert Cookbook by Pedro Perfeito, Reza Rad

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

OLE DB Command: executing SQL statements on each row in the data stream

In the Data Flow Task there are times when there is a need to run an SQL statement. This statement may just do something and not return any result, or may get input values and generate output values.

The OLE DB Command provides a way to execute SQL statements on OLE DB connections to databases. We will try to implement the Update part of the previous recipe's Upsert scenario in this recipe.

Getting ready

The previous recipe should be executed before beginning this recipe.

Execute the following command on the PacktPub_SSISbook database to create the stored procedure for updates in the Person table:

Create PROCEDURE dbo.UpdatePerson @ID nvarchar(10), @FirstName nvarchar(50), @LastName ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required