February 1, 2011 at 9:20 am
I have an Execute SQL Task that contains a cursor loop sql. At the end of the sql, I have a variable with the number of rows I have inserted from my cursor loop.
In the code, I have specified RETURN @RowCount. I have tried both Result Set and Output Parameters to populate my variable, neither which have worked. I am not sure how I handle the varible in the sql so that the task can recongnize it and pick it up.
February 1, 2011 at 9:30 am
You'd be wise not to mention the 'c' word in this forum 🙂
Have you tried SELECT ... rather than RETURN?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 1, 2011 at 9:32 am
I figured this one out. I put the following line of sql at the end of my code, and did a result set looking for the RowCnt and populating my Count variable in SSIS.
SELECT @RowCount AS RowCnt
February 1, 2011 at 9:36 am
Stringzz (2/1/2011)
I figured this one out. I put the following line of sql at the end of my code, and did a result set looking for the RowCnt and populating my Count variable in SSIS.SELECT @RowCount AS RowCnt
You figured it out?
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
February 1, 2011 at 9:37 am
Thanks Phil, I actually had a lightbulb go off before I saw your post, but you would have directed to the correct solution if I hadn't figured it out.
February 1, 2011 at 9:44 am
Stringzz (2/1/2011)
Thanks Phil, I actually had a lightbulb go off before I saw your post, but you would have directed to the correct solution if I hadn't figured it out.
Haha, good stuff. I've been up for hours & coming to the end of a big upgrade for a client, so I'm slightly edgy 🙂
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply