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 9033571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T08:16:14+00:00 2026-06-16T08:16:14+00:00

Is there a way to conditionally (through a script task or anything else), control

  • 0

Is there a way to conditionally (through a script task or anything else), control the flow of program in SSIS?

Currently I have a package that would create 5 different excel sheets (through Execute SQL Task) dynamically. There maybe times when all 5 will have data or only 1 may have data. When its just 1 that has data, it is fine. But the real problem arises when there are 5 DFT’s that are trying to write the data simultaneously to the same workbook (albeit different sheets inside that). The package fails with an OLEDB error.

After a lot of head breaking, I finally figured out that it was a concurrency control issue that wasn’t allowing me to write to the excel file simultaneously. To further my solution, I used expressions on precedence constraints to control if the sheets get created or not.
But the real trouble is that after creating the sheets, the package would fail trying to write data to 2 different sheets simultaneously.

Is there a way, I can assign an ‘Execution Order’ for the DFT’s? This is the reason I am looking for a script task so that when a particular sheet’s count is 0 then it does no work and the control moves to another branch.

I hope I have not confused you here. But if I have, I’ll be glad to provide more details on this question. Thanks for reading.

  • 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-16T08:16:15+00:00Added an answer on June 16, 2026 at 8:16 am

    My first thought is to have a bunch of sequence containers, one per possible Excel sheet, each of which holds three tasks:

    1. A script task to figure out whether or not to create the sheet, and set a boolean package variable accordingly
    2. An SQL task to create the worksheet
    3. A data flow task to populate the worksheet

    The precedence constraint between tasks 1 and 2 would be an expression of the boolean being true:

    screenshot of precedence constraint editor showing expression of @DoNorthRegion

    The precedence constraint between tasks 2 and 3 would be a success constraint, as would the precedence constraints between the sequence containers. Overall, it would look like this:

    screenshot of four sequence containers, one expanded to show contents

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

Sidebar

Related Questions

I have a task to create a program, that control a device over RS-232
Is there a way to conditionally embed resources into a .NET project? I.e. if
I was wondering if there is a way to conditionally compile entire namespaces in
Is there any way to do something conditionally in jquery only if IE6 is
Is there a way to dynamically and conditionally create a class definition in PHP,
I'm wondering if anybody knows of a way to conditionally execute a program depending
In Matlab, there is, as far as I know, no good way to conditionally
I have an SSIS package I am developing. I am attempting to write data
Is there another way to iterate through only the attributes of a custom class
Is there any way to conditionally specify EmitDefaultValue at runtime for the DataContractSerializer in

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.