SSIS Execute SQL Task: Output parameter Vs Result Set = single row

  • I have a stored proc that returns a single value (e.g. Min(Field1)). I can get this value into a global variable using either output parameter (adding an output parameter to my sp) and configuring Execute SQL task Parameters Mappings Tab OR leaving as is (no output parameter) and using ResultSet = Single Row and configure Result Set Tab. What are pros and cons for each approach?

  • Testing is easier on the single row, because when you call it interactively it returns the row so you can see it. The other way requires just a bit more code. In multi-modal code I will often give it the ability to do both and a flag to supress the resultset if needed. If these cases I build the output from the output variables so there is no possibility of there being a different answer from either.

    CEWII

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply