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

Posted on 2014-08-21
Last Modified: 2014-09-08
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.
Question by:25112
    1 Comment
    LVL 18

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    SQL HELP 2 65
    SQL help 5 42
    How do I convert this SQL SELECT into an UPDATE 10 20
    Help with SQL 9 61
         When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
    After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now