0

I have a scenario where I need to insert few records into database. I have analyzed and confirmed that only script component can help me.

Since I cannot give the exact data, I will explain the flow using sample data.

The main flow has employee records and employee id is the key.

there is a complex query which gets the row id based on rank and here the where clause should have employee id hard coded. Below is the sample only.

Select emp_name, location, designation from employee where emp_id = ? ;

My question is, how can I pull multiple values from query in script component ?

RakeshP
  • 141
  • 5
  • 15
  • You can use the multiple array variables as in this link: http://stackoverflow.com/questions/11751901/ssis-script-task-get-file-names-and-store-to-an-ssis-object-variable – Frank Goortani Nov 19 '13 at 19:11
  • @Learner Are you sure you need a script component? If you just need to execute possibly dynamic SQL, there are other ways in SSIS. – FrankPl Nov 19 '13 at 19:52

1 Answers1

0

If your dataset has multiple rows returned and you're wanting to process those row by row, I would think you need to use a for loop container to get these one by one. Depending on volume of data this could become a performance issue. I would also question if the script task is the right tool for the job. It is flexible, but there are other ssis constructs that may serve you better.

swilliams
  • 532
  • 3
  • 11