Tuesday, March 27, 2012

ForEach Loop Container

I am using a SQL Task to load the data needed for the loop into a variable, then using a script task to perform calculations. Is it possible to update a table from the script task with the calculated values?.

Thanks
You can use System.Data and ADO.Net inside a script task. You could even use an ADO.Net connection manager. Just write some normal VB.Net code to do your data access.

I don't know what you are doing, but I would question this method. Why not do it all in a single SQL Task? Why use a SQL task to do the update? Why not do it all in a script task?|||I want to test the performance difference between a cusor in sql 2000 and the loop in sql2005.|||

I wouldn't recommend that as a use of SSIS... instead, consider revisiting what you do with the cursors to be done using the data flow task.

regards,
ash

|||Let me explain what I am trying to do. I have +/- 600 performance reports to calculate each with 40 odd items. If I'm on the wrong path please point me in the right direction. I would appreciate any help.|||

Do all performance reports have the same structure just different data? Are all the calculations identical as well?

I'm intruiged by the problem and can work with you on how to do this in most efficient manner, we can then let the group know what we found.

regards,
ash

|||

Yes the structure for all reports are the same, the calculations are dependant on the specific measure.

May I contact you offline and not involve the forum until a suggestion is ready

No comments:

Post a Comment