Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8146775
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:06:54+00:00 2026-06-06T14:06:54+00:00

Assume the following scenario: All data are in Sql Server tables. 1) An Execute

  • 0

Assume the following scenario:

All data are in Sql Server tables.

1) An Execute SQL Task to determine if there are records to process by running a select against Table1.

2) If there are, an Execute SQL Task to truncate Table2.

3) A Data-flow task to Load Table2 with the results from the select against Table1.

Now, I can do that easily in a stored procedure, but am required to do it in SSIS.

So far, in the control flow, I’ve run my select and stored the results in a table variable, lets call it @ResultSet, and just for good measure, I have also created an object-type variable, let’s call it MyResults also holding the resultset.

To avoid truncation of Table2 if @ResultSet is empty, I then count the number of records in @ResultSet and raise an error if the count is zero, effectively aborting the package.

Normally this is not the case, and instead of starting my Data-flow by running the same query against Table1 all over again, I would now like to access either my @ResultSet or my
MyResults object like any other data source.

The latter should be possible using a scripting task, but I really, really don’t want to go down that road.

Whether I can use my @ResultSet or come up with an entirely different approach due to your input, that is the question.

TIA.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T14:06:56+00:00Added an answer on June 6, 2026 at 2:06 pm

    I believe your question is directly related to this one: SSIS Pass Datasource Between Control Flow Tasks
    You can indeed pass data from one data flow to another in a dataset, or through raw files. It is up to you to check which is better in your case though

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's assume we have the following generic scenario: An RDBMS as a data source,
Assume following scenario: There is a WPF window, within a MVVM implementation. Having following
Assume the following scenario. I have two files A.cpp and B.cpp in trunk. At
What would be the behaviour in following scenario: Assume i have two devices A
Trying to figure out how to best handle the following scenario: Assume a RequestContext
Let's assume the following scenario: Person A: calls person B. Person B with an
assume the following scenario: while(!notTheEnd) { char str[1024]; char* ptr_to_str; /* some strcat, strcpy
Assume the following scenario. i call a method like this String[] arr = {1,2,3};
For the sake of simplicity, let's assume the following tables exist: Table 1 -
I have a web application that loads some 50 tables from SQL Server into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.