Answered by:
row count destination record and pass to variable (SSIS)

Question
-
i wanna ask how can i get the total no of record inserted into table in destination in data flow control panel and then pass the total count into user define variable in SSIS? can i use "row count" object?Sunday, March 9, 2014 1:40 PM
Answers
-
Nope.. you cant as data destination task has no output available. Adding it just before the destination will give correct number of rows which are in the pipeline and getting inserted to destination. So that should be enough for you.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
- Edited by Visakh16MVP Sunday, March 9, 2014 5:55 PM
- Marked as answer by --_-- Wednesday, March 12, 2014 3:58 PM
Sunday, March 9, 2014 5:53 PM
All replies
-
you can use rowcount transformation and get the value saved into a variable. Then you can use OLEDB command inside to insert value to table. Just add a simple INSERT statement like below
INSERT table (Column) VALUES (?)
And map the variable in the mapping tab
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
Sunday, March 9, 2014 3:46 PM -
you can use rowcount transformation and get the value saved into a variable. Then you can use OLEDB command inside to insert value to table. Just add a simple INSERT statement like below
INSERT table (Column) VALUES (?)
And map the variable in the mapping tab
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
how can i connect "row count" to "destination" so that i can get the total count in destination ?
afterward, how can i pass the total count to variable?
any reference for me? provide picture if applicable
Sunday, March 9, 2014 4:53 PM -
You need to add the rowcount transformation just before the destination step ie output of RowCount transformation is linked to destination task. Inside rowcount transfrom you save value inside variable. Then you can use the variable in all the subsequent tasks to return the count value.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
- Proposed as answer by SSISJoostMVP Sunday, March 9, 2014 8:37 PM
Sunday, March 9, 2014 5:15 PM -
You need to add the rowcount transformation just before the destination step ie output of RowCount transformation is linked to destination task. Inside rowcount transfrom you save value inside variable. Then you can use the variable in all the subsequent tasks to return the count value.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
can i add "row count" after "data destination task"?Sunday, March 9, 2014 5:26 PM -
Nope.. you cant as data destination task has no output available. Adding it just before the destination will give correct number of rows which are in the pipeline and getting inserted to destination. So that should be enough for you.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
- Edited by Visakh16MVP Sunday, March 9, 2014 5:55 PM
- Marked as answer by --_-- Wednesday, March 12, 2014 3:58 PM
Sunday, March 9, 2014 5:53 PM