[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

example of passing a value from one '"Execute SQL Task" to another...

can you give me the steps that will be needed to capture a variable value in one "Execute SQL Task" and then use it in the next "Execute SQL Task", where both the "Execute SQL Tasks" use totally different connection strings.
0
25112
Asked:
25112
1 Solution
 
Jerry MillerCommented:
Create a user variable of the type that you need to pass.  

View-->Other Windows-->Variables if you don't already see it.

In the first Execute SQL task under result set, name the result  set what ever you want. In the variable name drop down select your newly created one. On the General tab, choose the result set type that corresponds with your variable (Full, single row, etc.)

In the second result set, on the General tab, choose the result set type that corresponds with your variable (Full, single row, etc.). Under Parameter mapping, choose your variable and the other options if you are using this in a stored procedure or other query.

http://msdn.microsoft.com/en-us/library/ms140355(v=sql.105).aspx
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now